Hide Text in an Image
Hide a secret text message in an image with LSB steganography, optionally encrypted with AES-256-GCM, and reveal it later. Runs locally, no upload.
How to hide a message in an image
- Drop an image on the drop zone, or click it to choose one. PNG is best, but any image your browser can open works: the result is always saved as a new PNG.
- Under Hide a message, type your text in Secret message. The Capacity line shows how many bytes the message uses and how many the image can hold.
- For confidentiality, tick Encrypt the message with a passphrase (AES-256-GCM) and type a Passphrase. Show passphrase lets you check what you typed.
- Click Hide message and download PNG. The file is saved as
name-hidden.png, and the status line tells you how many colour values were changed.
How to reveal a hidden message
- Drop the PNG in the same drop zone. If it contains a message hidden by this tool, a note says so as soon as the image is loaded.
- If the message was encrypted, type it in Passphrase (only if the message was encrypted).
- Click Reveal hidden message. The text appears under Hidden message, ready to copy.
Everything happens in your browser: the image, the message and the passphrase are never uploaded.
How it works: least significant bit (LSB)
Each pixel stores a red, a green and a blue value between 0 and 255. This tool replaces the last bit (the least significant bit) of these three values with one bit of your message, pixel after pixel in reading order. For example, a red value of 200 is 11001000 in binary; storing the bit 1 gives 11001001, which is 201. A colour value never changes by more than 1, a difference the eye cannot see.
Only fully opaque pixels are used, and the alpha channel is never touched. Semi-transparent pixels are skipped, because browsers cannot keep their low bits exactly. Before the message, the tool writes a 13-byte header: a signature, a flag saying whether the message is encrypted, the length and a CRC-32 checksum that detects damaged data.
Capacity is about (number of opaque pixels × 3 ÷ 8) − 13 bytes. A 1000 × 1000 photo holds about 375,000 bytes, far more than any text message. Encryption adds 49 bytes (version, iteration count, 16-byte salt, 12-byte IV and 16-byte authentication tag). With encryption, the key is derived from your passphrase with PBKDF2-SHA-256 (600,000 iterations) and the text is encrypted with AES-256-GCM, which also detects any tampering.
What steganography does not do
Steganography hides that a message exists; it is not strong security on its own. Sequential LSB embedding like this is easy to detect with steganalysis tools (chi-square tests, LSB plane analysis), and anyone who opens the image in this tool can read an unencrypted message. If the content must stay private, use the encryption option with a long, unique passphrase: the protection is only as strong as the passphrase. Even then, encryption protects the content, not the fact that something is hidden.
The hidden bits are also fragile. JPEG or WebP recompression, resizing, cropping, screenshots, filters and most social networks and messaging apps (which recompress and often convert images) destroy the message. Share the PNG as a file: an email attachment, a cloud storage link, or “send as document” in a messaging app.
Responsible use
Good uses include puzzles, escape games and CTF challenges, marking your own images, teaching how digital images work, and keeping private notes. Do not use it to get around workplace or school policies or the law, and respect other people’s images and copyright.
Frequently asked questions
Can people see that my image contains a message?
Not by looking at it: each colour value changes by at most 1. But a steganalysis tool can often detect LSB embedding, and this tool itself reports that a message is present when the image is loaded.
Why was my hidden message lost?
The image was probably recompressed, resized or converted, for example by a social network, a messaging app or a photo editor. Only the exact PNG file keeps the bits intact.
Can I start from a JPEG photo?
Yes. The photo is decoded and the result is saved as PNG, which is lossless. Keep it as PNG: saving it again as JPEG erases the message.
What happens if I forget the passphrase?
The message cannot be recovered. There is no back door, and a wrong passphrase is rejected by the AES-GCM authentication check.
Why is the PNG file larger than the original?
PNG is lossless, so it is usually bigger than a JPEG of the same photo. This is the price of keeping every hidden bit intact.
Related tools
- Text Encryption Tool Encrypt and decrypt text with a passphrase in your browser, using AES-256-GCM and PBKDF2 with 600,000 iterations. Nothing is uploaded. Honest limits explained.
- EXIF Remover Remove EXIF data and GPS location from photos before sharing. Lossless for JPEG and PNG, batch processing, and nothing is uploaded.
- Image to Base64 Converter Convert an image to Base64 or a data URI with ready-to-paste CSS and HTML, or decode Base64 back to an image with a preview. Free, private, no upload.
- Image Format Converter Convert images between PNG, JPG, WebP, BMP and ICO in your browser. Batch conversion, favicon sizes and transparency options, with no upload.