How to Hide a Secret Message in a Photo:
Steganography Explained

May 2026 7 min read Privacy & Encoding

You take a photo of your cat and share it online. It looks completely normal. But hidden inside it, encoded invisibly in the pixel data, is a secret message that only someone with the right tool can extract. Nobody looking at the photo would ever know it was there.

That's steganography — and it's been around a lot longer than computers.

What Is Steganography?

Steganography is the practice of hiding information inside other information. The word comes from the Greek steganos (covered or concealed) and graphia (writing). Unlike encryption, which scrambles a message so it can't be read without a key, steganography hides the fact that a message exists at all.

The distinction matters. An encrypted message announces itself — you can see there's something there, you just can't read it. A steganographic message is invisible. To anyone who doesn't know to look for it, there's nothing unusual about the image at all.

Encryption

Scrambles your message so only someone with the key can read it. Everyone can see a message exists — they just can't read it. Example: sending an encrypted email.

Steganography

Hides your message so nobody knows it's there. The message exists in plain sight, inside a completely normal-looking image or file. Example: a cat photo that secretly contains a text message.

You can combine them. Encrypting a message before hiding it steganographically gives you two layers of protection — the message is invisible and unreadable even if someone discovers it. For serious security applications, that combination is the right approach.

A Brief History

People have been hiding messages for a very long time. In ancient Greece, Herodotus wrote about messages tattooed on a shaved slave's head, then delivered after the hair grew back. During World War II, invisible ink was standard tradecraft. Microdot technology — shrinking text to the size of a period — was used by spies throughout the Cold War.

Digital steganography emerged in the 1990s as researchers realized that the massive amount of data in digital images and audio files created natural hiding places. A digital image contains millions of pixels. Each pixel contains color data. Changing that data in tiny, imperceptible ways creates room to store information without changing how the image looks to the human eye.

How LSB Steganography Works

The most common digital steganography technique is called LSB encoding — Least Significant Bit encoding. To understand it, you need to know a tiny bit about how images store color data.

A Quick Explanation of Pixel Color

Every pixel in a digital image has a color value stored as three numbers: one for red, one for green, and one for blue. Each number is stored in 8 bits, meaning it can range from 0 to 255. For example, a bright red pixel might be R:255, G:0, B:0. A medium gray might be R:128, G:128, B:128.

In binary (the ones and zeros computers actually use), 255 looks like this:

255 in binary:
1 1 1 1 1 1 1 1

254 in binary:
1 1 1 1 1 1 1 0← only this bit changed

The rightmost bit is the "least significant" bit — changing it only changes the color value by 1. The difference between a red value of 255 and 254 is completely invisible to the human eye. You'd need a microscope — and even then, you probably couldn't tell.

Encoding a Message

LSB steganography works by replacing those least significant bits with bits from your secret message. A typical image has millions of pixels, and each pixel has three color channels, giving you millions of bits of hiding space. A paragraph of text requires only a few thousand bits. The capacity far exceeds the message size for any normal use case.

The resulting image looks identical to the original. Pixel colors shift by at most 1 out of 255 — a change imperceptible to the human eye and difficult even for software to detect without knowing where to look.

Why PNG and not JPG? LSB steganography requires a lossless format like PNG. JPG compression works by discarding small amounts of image data — and it would discard the hidden message right along with it. Always use PNG for steganography.

Decoding a Message

To extract the hidden message, you simply reverse the process: read the least significant bits from each pixel in sequence and reassemble them into text. Without knowing a message is there, and without software designed to extract it, you'd never find it from a visual inspection alone.

Real-World Uses

Beyond the obvious spy-thriller appeal, steganography has practical applications:

It's also just interesting. The idea that a completely normal-looking photo could contain hidden information is genuinely fascinating — and it's the kind of thing that makes for great content if you're making educational videos about privacy and security.

How to Try It Yourself

You don't need any special software. ConvertoFile has a steganography tool that handles the encoding and decoding directly in your browser. Here's how to use it:

  1. Open the Steganography tool on ConvertoFile.
  2. Upload any PNG image — a photo, a screenshot, whatever you have.
  3. Type your secret message in the text field provided.
  4. Click Hide Message. The tool will encode your message into the pixel data.
  5. Download the output PNG. It will look identical to the original.
  6. To retrieve the message: upload the encoded image and click Reveal Message.

The whole thing takes about thirty seconds. The output image is indistinguishable from the input image to any normal viewer — including software that doesn't know to look for a hidden payload.

Try the Steganography Tool

Hide a secret message inside any PNG image and extract it later. Everything runs in your browser — nothing is uploaded anywhere.

Open Steganography Tool

Limitations and What to Keep in Mind

LSB steganography is robust enough for most practical purposes, but it has limitations worth understanding:

The Bottom Line

Steganography is the art of making secrets invisible. Unlike encryption — which locks the door but lets everyone know the door exists — steganography hides the door entirely. It's been used for thousands of years in various forms and remains relevant today in everything from copyright protection to covert communication.

LSB image steganography is the most common digital technique, and the results are genuinely imperceptible. If you haven't tried it, it takes thirty seconds and it's worth seeing for yourself.