A simple guide to hiding words and characters in an image file

Hiding text within an image file is one of the tricks used in Steganography. Using this trick you can hide any text information or a message within an image file irrespective of the fact that how long your information or message is. So, lets see how to do it. Follow the steps below.

Steps

  1. 1
    Choose an image file. For example: XXX.jpg
  2. 2
    Place this image in one of the drives in your computer system (running on Windows operating system only). Lets say you place it in \:D drive.
    Advertisement
  3. 3
    Open command prompt. (Press Windows+R, type 'cmd' and press 'Enter' key)
  4. 4
    Type following command: cd.. and press 'Enter' key. Repeat this step until you left with C:\> on your command prompt window. See this image:
  5. 5
    Now, type D: and press 'Enter' key. See this image: Now, your command prompt is able to locate D: drive.
  6. 6
    Type following command very carefully:
    echo "Type your message here" >> "XXX.jpg" and press 'Enter' key. Do mind the spaces given and braces I put in the command. See this image:
  7. 7
    If everything went perfect, Your text has been hidden within the image file XXX.jpg.
  8. 8
    In order to see the hidden text, Right-click 'XXX.jpg' image file and open it with 'Notepad'. You'll see something like shown in this image: This is actually your image information in encrypted form. You've nothing to do with this.
  9. 9
    Simply, scroll down to the end or just keep pressing 'Page dn' key.
  10. 10
    Here you're! You can see the text (you typed in Step 6) in simple readable form in the end. See this highlighted text in the image: You can check this is what I typed in the image shown in Step 6.
  11. 11
    You can also hide a file within an image file read How To Hide A File In An Image File.
  12. Advertisement

Community Q&A

  • Question
    How do I put a quotation mark in the message?
    Community Answer
    Community Answer
    A backslash "\" will cancel out any other functions a character may have other than plain text when typing in any kind of command line. So, say you wanted to make it read "My mother said "Do your chores!"", you would type it like so: "My mother said \"Do your chores!\"", and the \ before each " will work.
  • Question
    When I tried this out, the image was unaffected but when I wanted to edit the words the image would become corrupt. How do I delete words safely from the image?
    Community Answer
    Community Answer
    In your case, I think that zip files are better for this method because of the structure of zip files and image files.
  • Question
    When I open hidden text from an image sent to me in Notepad, it looks like a bunch of characters, letters, symbols, etc. How do I sort it out to read?
    Arrogance
    Arrogance
    Top Answerer
    As the article says, you're expected to scroll down to the bottom of the file, either with the scrollbar or the Page Down button. Because you're simply concatenating unpredictable plain text, and not a file type with specific headers, like zip or rar, there's no simple way to filter it. If you standardized the beginning of a line with something predictable like "MESSAGE: Hello! ", you could filter it in the Command Prompt with 𝐟𝐢𝐧𝐝𝐬𝐭𝐫 "𝐌𝐄𝐒𝐒𝐀𝐆𝐄:" 𝐢𝐦𝐚𝐠𝐞.𝐣𝐩𝐠
Advertisement

Warnings

  • You may need administrative privileges in order to run command prompt so, you better log in as an administrator.
    ⧼thumbs_response⧽
  • Do mind the spaces given in the command and also the put braces in as shown.
    ⧼thumbs_response⧽
  • This trick only works on computer systems running on Windows platform.
    ⧼thumbs_response⧽
Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 107,821 times.
How helpful is this?
Co-authors: 6
Updated: June 20, 2022
Views: 107,821
Categories: Command Prompt
Advertisement