How to Hide Files Inside JPEG/GIF/PNG Images

Ads by Google

We discussed various methods for hiding files inside your computer. Methods include super secure Truecrypt which offers military level security and handy MyLockbox to lock any folder. But all these methods require installation of software on your PC which is obviously visible to others.

We are now going to talk about a unique method of hiding files that’s kinda sneaky and doesn’t require a third-party tool. This technique involves hiding  files inside JPEG, GIF or PNG images. Sounds cool, right? Lets see how it is done.

1. Create a folder in C drive. Give it a name, lets say Testfile. It’s location should be C:\Testfile.

2. Now move all the files you want to hide inside this folder. Also move the image file in which you want to hide those files. Let’s say the files which I want to hide are FileA.txt and FileB.txt, and the image file is Image.jpg. We are taking .txt files as an example. You can take files of any format (.mp3, .doc, .divx, .flv etc.) and any number of files.

hide file inside image

3. Select both the files you want to hide (FileA.txt and FileB.txt in this case), right click and select “Add to Archive”. Make sure that you’ve got a file compression tool like WinZip or ZipGenius, a cool free winzip alternative, installed.

testfile image

4. Give it a name. I have given Compressed.rar. You can give it any name.

compressed files

5. Click on “Start” button. Type cmd in the search box. Press Enter.


6. A command prompt window will open.

Ads by Google


7. Type cd \ and press Enter to get to the root directory.


8. Now type cd Testfile to enter in the newly created directory.


9. Type copy /b Image.png + Compressed.rar Secretimage.png and press Enter.


10. When you look up at Testfile folder, you will find a new image file called SecretImage.png. This image file is created in previous step with the help of command. Secretimage is just a name given to the new image. You could give any name and extension (like xyz.jpg or xyz.png).

Both the files FileA.txt and FileB.txt are hidden inside this image file. You can delete rest of the files now.


How to get our Files back from the image

That’s easy too. Just right click on the image (SecretImage.png) and open it with Winrar/Winzip/ZipGenius. You will see both the hidden files. Extract them anywhere on your computer.

Update: From comments I came to know that few users are facing problem while opening image file in Winrar application. They can change the file extension of secret image file in which all the other files are hidden from .jpg to .RAR. (In the above case SecretImage.png to Secretimage.RAR) and then open it with the help of Winrar.

That’s about hiding confidential files in Images. A foolproof method to hide important files. Did you like this technique? Let us know in comments.

Get Guiding Tech articles delivered to your inbox.

We will never share your address. Unsubscribe at any time.

Post a Comment or Discuss at Guiding Tech Forums

Show archived comments (22)

Archived Comments

  1. kzshantonu says:

    Good way. But TrueCrypt’s better.

  2. help says:

    it didn’t work. At least not with my pc.EVERYTIME i reach the last step and right click on the newly-created image it doesn’t open with any compression tool(winrar or 7z). I instead get an error message that the file is either broken on in an unknown format(compression tool).I’m sorry if didn’t translated the error message correctly but my windows are not in English..any suggestions?

    eg. i used winrar and i compressed two .txt files. and my OS is xp(i that helps)

    • Steen Lund says:

      I had the same problem. I used winzip as compression tool and I got the same error message. I just renamed secretimage.jpg to and had no problem retrieving my hidden files.

      • Himanshu says:

        Thanks Steen, for your tips. The process mentioned in the article works well in my computer, don’t know the reason why others are unable to open it with Winzip.

    • Himanshu says:

      @help It worked well in my computer and I am using Windows Vista Business edition. Well, as suggested by Steen, the best solution for this problem is changing the extension of file, i.e. secretimage.jpg to and then open it with Winrar. It will definitely going to work.

  3. TrailBoss says:

    Big deal. If you’re gonna RENAME it to a “zip” file, you may as well post a sign saying “secret docs inside”. That is HARDLY “hiding” anything. WHAT was the purpose of this again?

    • Himanshu says:

      @TrialBoss Here in an example I choose a file name as secretimage.jpg only to make the thing understandable. You are free to choose any other name (abc.jpg or xyz.jpg). Also if you are changing file extension to .zip, you are doing it only to view files hidden inside it. After you view the file, you can again change the extension it to .jpg. No one can figure it out.

      Hope this will help you.

  4. Holiness says:

    Incorrect: “A full proof method to hide important files.”

    Correct: “A fool proof method to hide important files.”

  5. Randomaster says:

    Kewl.. But I prefer using OmniHide for doing this. That way, I can hide within movies, home photos, or music files too.

  6. Babel says:

    really nice idea and easy way! :) will give it a try!

  7. shweta says:

    wahoo..dis ws vry nce technique..i also faced sme kind of problim in last step..
    but after 2-3 minutes i did solved itself..thnkss for such nice solution..

  8. Rodion says:

    OMG… Extremely stupid idea, sorry, since many file managers and browsers can easily scan content of the files and show user that it is not image at all…

    Your post only bewilders search engines and makes seeking for real techniques more hard… :-(

  9. Alex says:

    But my question is,
    Is there any command to separate those files by DOS.
    Imagine, if you have not zipped those files and added it to image than how would you retrieve back those files. It will be not open-able with any WinZip or WinRAR program.
    Please reply me soon if you have any idea, I really need this.

  10. Big_john says:

    Alternate method:
    Hide In Picture (HIP). A cool little no install program that hides files in bmp format and
    option to password protect.

  11. Edward says:

    thanks its work!

  12. xyz says:

    good…but i was searching the way to execute that hidden file by directly opening that image ….. help required

  13. Melanie says:

    Your lack of knowledge of English article usage makes this article seem encrypted. Good for you, you pass on being cryptic. Now take some classes from a native speaker.

    • OccamsKatana says:

      How many languages do you speak perfectly Melanie? Have you read any technical manuals lately Melanie? Articles aren’t there Melanie. But, good thing we have grammar police like you on the prowl to save us. (Notice how I started that sentence with a conjunction, Melanie?) Your assumptions that the writer lacks knowledge of English article usage astounds me. You’re a mind reader too. But, (there, I did it again) your comment was good for a laugh, at your expense.

  14. Manu says:

    yes i like this technique

  15. this is like stone age wheel…
    still functional and does need nothing to work.
    just like if you are not in your home desk, and need to hide something at school or office.