We hid files inside photos and tried to find them again
The short answer
Steganography hides the fact that a message exists: the picture looks ordinary and carries data. We hid text, a ZIP file and random data in five photos and tried to find them again. Reading the lowest bits of the pixels recovered the text and the ZIP in all five, and a ZIP stuck behind the picture was found every time. A statistical test spotted random data filling the whole picture in 5 of 5 photos, but it also fired on a few clean pictures, so it can only ever say "possibly". Data hidden with a password, or inside a JPEG's compressed data, needs the key or specialist tools.
Encryption hides what a message says. Steganography hides that there is a message at all. A picture is a good carrier because it is large, nobody inspects its bytes, and small changes do not show. People use it for harmless things, such as watermarks, puzzles and capture-the-flag challenges, and for less harmless ones, such as smuggling data out of a company or hiding malware.
The idea is far older than computers.
he shaved and branded the head of his most trustworthy slave. He waited till the hair had grown again, and as soon as it was grown, he sent the man to Miletus
The message was invisible until someone knew to shave the messenger's head. A picture file works the same way: nothing looks wrong until you know where to look. To find out where looking pays off, we built our own test, ran it through the three steganography tools on this site, and wrote down what found the hidden data and what did not.
Four places to hide data in a picture
| Where | How it works | What it leaves behind | How easy to find |
|---|---|---|---|
| Behind the picture | Bytes added after the end of the image data. Viewers stop reading at the end, so the picture still opens. | A larger file, and bytes after the image's end marker. | Easy: the file structure shows it. |
| In metadata | Text in EXIF, XMP or PNG text chunks, or a comment. | Readable fields. | Easy: a metadata viewer lists them. |
| In the pixels | The lowest bit of each color value is replaced by a bit of data. A change of 1 in 255 is invisible. | Patterns in the lowest bits, and evened-out statistics. | Often, when no password was used. |
| In see-through pixels | Fully transparent pixels still have a color nobody sees, free to hold data. | Color values in pixels that are completely see-through. | Easy, once you check. |
What we hid, and what found it
We took five photos, saved them as PNG (a format that keeps every pixel exactly) and hid a different payload in each copy: a text message in the lowest bits, a small ZIP file in the lowest bits, random bits in 20% of the picture, random bits in every pixel, a ZIP appended behind the picture, and random data in see-through pixels. Then we ran each file through the Steganography Detector.
| Hidden payload | Found by reading the bits or the file | Flagged by the statistic |
|---|---|---|
| Text message in the lowest bits | 5 of 5, readable | Often not: a short message changes few bits |
| Small ZIP file in the lowest bits | 5 of 5, downloadable | Often not |
| ZIP behind the picture | Found | Not needed |
| Random data in see-through pixels | Found | Not needed |
| Random bits in 20% of the picture | Nothing to read: random bits have no structure | 4 of 5 |
| Random bits in every pixel | Nothing to read | 5 of 5 |
| No payload (clean copies) | Nothing found | 1 of 5, a false alarm |
Anything with structure, such as text or a file, is found by reading it back, and once it is read there is no doubt. Random-looking data cannot be read, so only the statistic can notice it, and the statistic needs a lot of it.
The control: 208 pictures with nothing hidden
A detector is only useful if it stays quiet on clean pictures, so we also ran 208 real and AI pictures with nothing hidden in them. The first version of the text reader reported 12 "hidden texts" that were really chance runs of letter-like bytes. We tightened the rule: a find now has to start with one of 16 known file signatures, or be at least 24 readable characters that look like text. After that, it found no false text or file in any of the 208.
The statistic was harder to quiet. It fired on 5 of 48 AI-made PNGs, 1 of 18 AI-made WebP pictures and 2 of 66 real photos decoded from JPEG. Smooth, processed pictures can look "evened out" with nothing in them, which is why the tools show this result as "possibly" and never as a finding.
A bug we caught along the way
Testing see-through pixels turned up a problem in our own tools. Pictures with transparency were being read bottom row first, which drew their bit planes upside down and made the detector miss a payload written from the top. Safari also lost the colors under see-through pixels. Since 2026-10-23 these pictures are read through WebGL so the hidden colors survive, top row first, in Chrome, Firefox and Safari, and a 30-check test runs in all three browsers.
How hiding in the lowest bit works
A pixel's red value of 200 is binary 11001000. Change the last bit to 1 and it becomes 201: the pixel looks identical. Do that for every red, green and blue value and a 1,000 × 1,000 picture holds 3 million bits, about 375 KB, in a change nobody can see. That is LSB steganography, named after the least significant bit. Reading it back is the same walk: take the last bit of each value in the same order and join the bits into bytes.
What differs between hiding tools is the layout, which is why reading the data back means trying combinations: which channels, 1 or 2 bits per value, rows or columns, the bit order inside each byte, and whether a length comes first. Our detector tries 7 channel orders, 1 or 2 bits, rows or columns, both bit orders, with and without a 4-byte length in front. Extract Hidden Data lets you set each of these by hand.
What bit planes show
A bit plane is one bit position of one channel, drawn in black and white. The top planes draw the outline of the picture. The lowest plane of a natural photo looks like noise, because a camera sensor cannot measure the last bit precisely. With data hidden in it:
- A message shorter than the picture: the plane changes character partway down, because the message starts at the first row and stops.
- A picture-sized message: noise everywhere, so it looks like a normal photo. That is when statistics are needed.
- A picture hidden in a picture: the low planes show a faint shape.
You can look for yourself with the Bit Plane Viewer. Looking at the planes is one of the two attacks in the paper that showed how weak early hiding tools were, and it opens with this verdict:
The majority of steganographic utilities for the camouflage of confidential communication suffers from fundamental weaknesses.
Their paper showed that four hiding tools of the time, EzStego, Jsteg, Steganos and S-Tools, all treated the lowest bits of a picture as random noise that could be swapped for data without leaving a trace. They are not random, and both of the checks that follow come from that observation.
The chi-square test
In a natural picture, the counts of neighboring values such as 120 and 121 differ: a sky might have many 120s and few 121s. Overwriting the last bit with random data makes both values equally likely, so the counts of each pair even out. The chi-square test from Westfeld and Pfitzmann's paper measures how even the pairs are.
We run it over stretches of 65,536 pixels per channel, in reading order. A payload written from the top leaves a run of evened-out stretches from the start and normal ones below. The detector calls a picture suspect when the run from the start covers 3 or more stretches (at least a sixth of the picture), or when 90% or more of all stretches are evened out.
How big a payload has to be before the test notices
Those two thresholds turn into a minimum payload size that depends on the picture. A stretch counts as evened out when its pairs test passes at the 5% level, and the run from the start has to reach at least 3 stretches and at least a sixth of all stretches in one channel. Assuming the common layout of one bit in each red, green and blue value, written from the top:
| Picture | Stretches per channel | Run needed from the start | Smallest payload that gets there |
|---|---|---|---|
| 400 × 400 (0.16 MP) | 2 | Not tested: fewer than 3 stretches | None. Only reading the bits can find it |
| 500 × 500 (0.25 MP) | 3 | 3 (all of them) | about 72 KB |
| 1000 × 1000 (1 MP) | 15 | 3 | about 72 KB |
| 1920 × 1080 (2 MP) | 31 | 6 | about 144 KB |
| 4000 × 3000 (12 MP) | 183 | 31 | about 744 KB |
Each stretch is 65,536 pixels, and at 3 bits a pixel it holds 24 KB of payload, which is where these figures come from. Two things follow. A text message of a few kilobytes never reaches the threshold in any picture, which matches our test, where the hidden texts and small ZIP files were found by reading them back while the statistic often stayed quiet. And the bigger the photo, the more data someone can hide in it before the statistic has anything to say: a 12 MP photo can carry several hundred kilobytes of encrypted, random-looking data in its top rows and still read as clean.
Why a JPEG changes everything
PNG and BMP keep every pixel exactly. JPEG does not: it rewrites the pixels each time it compresses, which destroys anything written into the lowest bits. Tools that hide data in JPEG files therefore work on the compressed data instead (the idea behind F5, OutGuess and steghide), a different place that needs different tools. For JPEG and WebP files, our detector skips the bit statistics and the low-bit reading, except for whole files and texts of 40 characters or more, and still checks the file structure and anything behind the picture.
Hiding versus watermarking
Invisible watermarks also hide a signal in a picture, but for the opposite reason: to be found by their maker even after the picture is shrunk or re-saved. Google's SynthID is designed to look like noise and survive compression and edits, and like most marks built to survive editing it can only be read by the company that added it. The invisible mark of the Stable Diffusion reference code is a simpler, published scheme that anyone can read, and resizing, cropping or strong JPEG compression wipe it out. Our AI Image Checker reads the Stable Diffusion mark. Content Credentials and watermarks covers the rest.
How to check a picture yourself, step by step
Work from the outside in, and start from the original file: a re-save, a screenshot or a chat copy may already have removed what you are looking for. The Steganography Detector does steps 3 to 6 in one go.
- Look at the file. Is it the size you would expect? A 400 × 300 PNG of 3 MB, or a small JPEG far larger than its dimensions explain, deserves a closer look. Note the format too: for a JPEG, the pixel tests say little.
- Read the metadata. Open the picture in the Image Metadata Viewer. Text chunks, comments, XMP fields and odd Software values are the simplest hiding places, and they are plainly readable. EXIF data explained shows what is normal.
- Look behind the picture. If bytes sit after the end of the image, the detector shows how many, what they start like (a ZIP, a PDF, a PNG) and a hex dump, with a download button. Some are innocent: phones store motion-photo video or maker data behind a JPEG, and the detector names those where it can.
- Read the lowest bits. For lossless pictures the detector reads the low bits in all the common layouts and looks for a known file type or readable text. A hit shows the text or a hex dump. If nothing turns up, try other layouts by hand in Extract Hidden Data: other channels, the other bit order, columns, or a few bytes skipped for a header.
- Check the statistics. The bars in the detector show, for each channel, which stretches have evened-out low bits. A long run from the start is what a large payload leaves. Use it to decide where to look next.
- Look at the planes and the see-through pixels. In the Bit Plane Viewer, a shape, text or a sharp boundary between noise and smooth areas in bits 0 and 1 is a sign. For pictures with transparency, the detector also reports see-through pixels that still carry color.
What each result lets you say
| Result | What you can say |
|---|---|
| Text or a file extracted | "This picture contained X." Treat an extracted file like any unknown download: it could be a program. |
| Unrecognized bytes behind the picture | "There are N bytes after the image that I cannot identify." They may be encrypted, or harmless maker data. |
| Only "possibly" from the statistics | "Nothing was readable; one statistic looked unusual." On its own that is not evidence of a payload. |
| Nothing found | "The common methods found nothing." Hiding with a password, inside JPEG data or with encryption can still be present. |
Innocent data that looks suspicious
Plenty of ordinary files carry extra bytes, and most finds behind a picture have a dull explanation. The metadata engine behind the detector names the common ones before you start worrying:
| What the detector reports behind the picture | Usual explanation |
|---|---|
| An embedded video (for example a motion photo clip) | A phone's motion or live photo stored as one file: the still JPEG first, a short video after it |
| Another embedded JPEG image | A second picture saved by the camera or phone, such as a larger preview or a depth image |
| Samsung extra data (SEF) | Information Samsung phones add for their own gallery features |
| An XMP metadata packet | Metadata some programs write at the end of the file |
| An archive hidden after the image | No innocent camera does this. Someone joined a ZIP, RAR or 7z file to the picture |
| Unrecognized data | Anything from padding left by an editor to encrypted data. Look at the hex dump: long runs of zeros are padding |
See-through pixels that still carry color have a common innocent cause too. Some image editors keep the old colors when you erase to transparency, and GIMP's PNG export has an option to save the color values of transparent pixels. Leftover colors from an eraser look like the picture around them; data looks like static.
Worked example: a ZIP behind a holiday photo
Someone sends you beach.jpg, a 1600 × 1200 photo of 3.1 MB. A JPEG of that size is usually well under 1 MB, so it deserves a look. The Steganography Detector reports:
2,317,456 bytes sit after the end of the picture, starting like a ZIP archive (or docx, jar, apk).
Here is how to handle that safely:
- Download the carved bytes with the detector's button. The detector only offers the file; it never opens or runs it.
- Look before you open. List the archive's contents with an archive tool rather than extracting it. File names ending in
.exe,.scr,.jsor.lnkare programs or scripts, whatever the icon suggests. - Scan it with your antivirus software before extracting anything.
- Never run a program that came out of a picture. If it was meant for you, the sender can send it openly.
The same caution applies to anything the low-bit reader extracts. The detector names 16 file types by their first bytes, which is how it knows what it found:
| Starts with (hex) | File type |
|---|---|
89 50 4E 47 0D 0A 1A 0A | PNG image |
FF D8 FF | JPEG image |
47 49 46 38 ("GIF8") | GIF image |
50 4B 03 04 ("PK") | ZIP archive, and formats built on it: docx, jar, apk |
25 50 44 46 2D ("%PDF-") | PDF document |
37 7A BC AF 27 1C | 7-Zip archive |
52 61 72 21 1A 07 ("Rar!") | RAR archive |
1F 8B 08 | gzip data |
42 5A 68 ("BZh") | bzip2 data |
4D 5A ("MZ") | Windows or DOS program |
7F 45 4C 46 | ELF program (Linux and others) |
00 61 73 6D | WebAssembly module |
53 51 4C 69 74 65 20 66 ("SQLite f") | SQLite database |
4F 67 67 53 ("OggS") | Ogg audio |
49 44 33 ("ID3") | MP3 audio |
52 49 46 46 ("RIFF") | RIFF file: WAV, WebP, AVI |
When it searches inside a blob for files packed further in, it skips the two-byte "MZ" start, since two bytes turn up by chance far too often to mean anything.
Where these checks stop
- Passwords and keys. A tool that encrypts the data, or scatters the bits in a password-chosen order, leaves random-looking bits in random places. Even a perfect extractor sees noise.
- JPEG-domain hiding. F5, OutGuess and steghide work on JPEG's compressed data, which these pixel tests do not read.
- Very small payloads. A few hundred bits in a large picture change nothing a statistic can see; only reading the bits in the right layout finds them.
- Very large pictures. Above 40 megapixels, the detector checks the file structure only.
Going further on a computer
When the routine above finds nothing and you still have a reason to look, free command-line tools go deeper. These are their basic forms:
| Command | What it does | Best for |
|---|---|---|
exiftool -a -G1 picture.jpg | Lists every metadata tag, duplicates included, with the block each came from | Text hidden in odd or duplicated fields |
binwalk picture.png | Scans the whole file for known file signatures at any position | Files packed inside or appended to the picture |
binwalk -e picture.png | Extracts what it recognizes into a folder | Getting those files out |
zsteg -a picture.png | Tries every bit and channel layout it knows on PNG and BMP files | Low-bit data in layouts our detector does not try |
steghide extract -sf picture.jpg | Asks for a passphrase and extracts steghide data from JPEG, BMP, WAV or AU files | Files you suspect were made with steghide, when you have the password |
Run them on a copy, and in a folder you can delete afterward, because extraction writes whatever it finds to disk. The same rule as before applies to the output: inspect it, scan it, and never run it.
Five photos saved as PNG, each with a text message, a small ZIP and random bits (20% and 100% of the picture) written into the lowest bits, plus a ZIP appended behind a PNG and random data in see-through pixels. The control set was 208 real and AI-made pictures with nothing hidden. The chi-square test runs on stretches of 65,536 pixels per channel. Pictures with transparency are checked in Chrome, Firefox and Safari by a separate 30-check test.
Look for data hidden in a picture: files appended behind it, text in the lowest bits of the pixels, data in transparent pixels. It runs in your browser. Open the Steganography Detector.
Frequently asked questions
Is steganography illegal?
Hiding data in a picture is not against the law in itself. The law looks at what the hidden data is and why it was hidden. Our tools are for finding it.
Can a normal photo contain hidden data?
Yes, any file can, especially one that has been through unknown hands. Most photos contain none.
Why can I not see the change in the picture?
Changing a color value by 1 out of 255 is far below what the eye can tell apart, and the changes go up and down at random.
Does converting to JPEG destroy hidden data?
It destroys data written into the lowest bits of the pixels, because JPEG rewrites the pixel values. Data appended behind the picture is usually dropped too, but metadata may stay. That is why people share such pictures as PNG.
Can the statistic prove there is a payload?
No. It shows the low bits are unusually even, which a few clean pictures also do. Only extracting readable text or a file is proof.
Does a PNG optimizer remove hidden data?
It depends on the kind of optimizer. Lossless optimizers repack the compressed data but keep every pixel value, so bits hidden in the pixels survive; they often drop text chunks and anything after the end of the file, so those hiding places are emptied. Some offer an option that changes the color of fully transparent pixels, which wipes data hidden there. Optimizers that reduce the number of colors change the pixel values themselves and destroy low-bit data.
Can a picture with hidden data harm my computer just by being opened?
The hidden payload does nothing on its own: a picture viewer draws the pixels and never runs data tucked into them or behind them. The risk starts when a program extracts the payload and runs it, which is why malware that hides in pictures needs a separate program on the machine to pull it out. Keep your viewer and system updated, and treat anything extracted from a picture as an unknown download.
Where should I start if I only have a minute?
Drop the file into the Steganography Detector. It checks behind the picture, the lowest bits and see-through pixels at once.