PNG Data Hider

Hides a UTF-8 text message inside a PNG using real least-significant-bit (LSB) steganography: the message, prefixed with a length header, is written one bit at a time into the lowest bit of successive red/green/blue channel bytes, leaving alpha untouched. Each changed byte shifts by at most 1 out of 255, invisible to the eye but fully recoverable. Capacity is limited by image size (roughly width*height*3/8 - 4 bytes) and the tool returns a clear error if the message doesn't fit. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

This tool hides a text message inside a PNG image's own pixel data, entirely in your browser, using a real steganography technique rather than a simulated one.

The output looks visually identical to the original image, but carries your message encoded in the least-significant bits of its color channels.

What Is PNG Data Hider?

An LSB (least-significant-bit) steganography encoder: it UTF-8 encodes your message, prefixes it with a 32-bit length header, and writes each resulting bit into the lowest bit of successive red, green, and blue channel bytes across the image.

Because only the least-significant bit of each byte changes, and only by at most 1 out of 255, the visual difference is imperceptible under normal viewing.

How PNG Data Hider Works

The message is encoded as UTF-8 bytes and prefixed with a 32-bit header recording its length, so the exact message length is known when reading it back.

Each bit of the header-plus-message is written into the lowest bit of one R, G, or B byte at a time (skipping alpha), moving pixel by pixel across the image until every bit has been placed.

When To Use PNG Data Hider

Use it to experiment with steganography, watermark an image with an invisible identifying note, or embed a hidden message as a puzzle or demonstration.

It's well suited to learning how LSB encoding works, since the technique here is the genuine algorithm, not a simplified stand-in.

Features

Advantages

  • Runs entirely client-side; your message and image are never sent to a server.
  • Uses a real, working steganography technique — not a gimmick or placeholder.
  • Leaves the alpha channel untouched, so transparency is never affected.

Limitations

  • Capacity is limited by image size: roughly width times height times 3 divided by 8 bytes, minus a small header overhead; large messages need large images.
  • LSB steganography is not encryption — anyone who knows to look for it (or runs the same extraction algorithm) can recover the message, so don't rely on it for sensitive secrets.

Examples

Hiding a short note

Input

A 200x200 PNG, message: "Hello, world!"

Output

A visually identical PNG with the message encoded across its red/green/blue channel bits.

13 bytes of message plus a 4-byte header fits comfortably within a 200x200 image's roughly 15,000-byte capacity.

Message too long for a small image

Input

A 10x10 PNG, a 500-character message

Output

Error: "This message is too long to hide in this image. Max capacity here is about 33 bytes."

A small image simply doesn't have enough pixel bits to carry a long message.

Best Practices & Notes

Best Practices

  • Use a larger image if you need to hide a longer message — capacity scales directly with pixel count.
  • Keep in mind this is imperceptible, not encrypted; anyone running the same LSB-reading algorithm can recover the message.

Developer Notes

The lib function operates on a plain PixelBuffer with no DOM dependency: it UTF-8 encodes the message, builds a bit array from a 32-bit length header followed by the message bytes, and writes each bit into the lowest bit of successive R/G/B bytes (alpha skipped) using bitwise AND/OR; a companion revealHiddenDataFromPng function performs the inverse read for the module's own round-trip tests.

PNG Data Hider Use Cases

  • Embedding an invisible attribution or note inside an image file
  • Learning and demonstrating how LSB steganography works
  • Creating a hidden-message puzzle or easter egg in an image

Common Mistakes

  • Assuming LSB steganography provides encryption-grade security — it only hides the message from casual inspection, not from anyone who knows to extract it.
  • Trying to hide a message longer than the image can carry and being surprised by the capacity error instead of resizing the image first.

Tips

  • If your message doesn't fit, either shorten it or use a larger source image before re-encoding.
  • Save the output as PNG (not JPEG or another lossy format) — any lossy re-encoding will scramble the hidden bits.

References

Frequently Asked Questions