How to hide data within an image

For this to work you need WinRAR installed on your computer and Microsoft Windows with access to the command prompt. If you do not have WinRAR installed on your computer you can find a link to download this program through our recommended download section.

Hiding a message or other data

  1. Create a text file with your secret message or hidden data and highlight it and highlight each of the files you want to secretly add to the image file. In this example, we created one text file called message.txt.
  2. Once highlighted right-click the highlighted file and click Add to "message.rar", where message.rar is the name of the file you right-clicked on.
  3. Open an Windows command line window.
  4. Move to the directory that contains the .rar file and the image you use for the hidden text.
  5. Type a command similar to the below command.

    copy /b secret.jpg + message.rar hidden.jpg

    In the above example, "secret.jpg" is the name of the image you're using, the .rar file is the name of the file used earlier, and hidden.jpg is the name of the new image with the hidden message within it. See the copy command page for additional information about this command.

Once the above steps have been completed you should now have an image called hidden.jpg that contains the hidden message. It's a good idea to make sure you're still able to open and view the image before saving it, posting it on the Internet, or otherwise distributing it. Below is an example of the hidden.jpg we created doing the above steps.

Secret Image

Viewing the secret message

To view the hidden message or hidden files you must have followed the above steps. If the above steps were performed to create the image follow the steps below to view the data.

Note: You can use the above secret image as an example image if needed.

  1. Save the image to the computer if you're viewing it online.
  2. Open WinRAR by clicking Start, Programs, WinRAR, and then WinRAR.
  3. Within WinRAR click File and Open archive. Within the open window make sure your files of type option is all files and not just compressed files.
  4. Browse to the location of the image and double-click the image to open it.
  5. Once open it should display the file(s) contained within the image that can be extracted from the image.

Additional information

  • See our image and RAR definitions for further information and related links on these terms.