DevTools Logo

LSB Image Steganography Tool

LSB Image Steganography Tool

Hide a UTF-8 message in a PNG's LSB planes or extract one — with honest capacity, checksums and a visible diff.

Runs in your browser
Try an example

Image

No image loaded

Drop a PNG here, or use a sample. PNG only for reliable extraction.

Message & channels

0 B UTF-8 bytes

Load an image to see its exact byte capacity.

13-byte DTS1 header (magic, mode, u32 length, FNV-1a) · bits are written MSB-first.

Embedded PNG & diff

waiting

Load a PNG and type a message

Everything runs locally in this tab — no image or message is uploaded.

Honest limits

PNG stays lossless. JPEG re-compression changes LSBs and destroys the payload; screenshots and chat apps re-encode too. Palette PNGs become RGBA on canvas, and alpha is never used for bits.

LSB embedding is easy to detect statistically, especially near full capacity. Use it for learning and CTFs, not for secrecy. Pair it with text-encryptor first if the content is sensitive; image-watermarker is the visible-mark sibling tool.

Images, messages and payloads stay in this browser tab and are never stored.

Load a PNG, type a UTF-8 message and embed it in the least significant bits of the RGB channels. A 13-byte header carries the DTS1 magic, the channel mode, a big-endian length and an FNV-1a checksum, so extraction auto-detects the mode and reports clean no-payload, truncation and corruption verdicts. Capacity is computed byte-exactly before embedding, and a diff report shows changed pixels per channel plus an amplified view. Alpha bytes are never modified and nothing is uploaded.

Examples

Short message in a sample

Input
64×64 noise PNG, RGB channels, message “Hello LSB — 🌍”
Output
Capacity 1,523 B · payload 17 B · ~8 pixels changed

The meter counts UTF-8 bytes; the emoji alone costs four.

Red-only embedding

Input
64×64 PNG, red channel, message “red ✓”
Output
Capacity 499 B · extraction auto-detects mode 2

Choosing one channel cuts capacity by roughly two thirds but leaves G and B untouched.

Corrupted payload

Input
Embedded PNG saved as JPEG, then reopened
Output
Payload is corrupted — checksum mismatch

Lossy re-compression usually changes LSBs while leaving the magic readable; the checksum is what catches it.

About this tool

LSB Image Steganography hides a UTF-8 text message in the least significant bits of a PNG's colour channels. Bits are written in row-major pixel order, most-significant bit first within each byte, so a 13-byte header of DTS1 magic, channel mode, big-endian length and FNV-1a checksum survives with the payload. The extractor probes all supported channel modes and reads the mode from the header, so red-only and blue-only images round-trip as reliably as the RGB default.

The capacity meter is exact: floor(pixels × selected channels / 8) minus 13 header bytes. Alpha is never touched, and a second embed always starts from the pristine decoded image. A diff report counts changed LSB slots and pixels per channel, and an amplified view paints each changed pixel white so you can see where the bits live. Every byte stays in the browser tab — there is no upload and no persistence.

This is educational steganography, not covert communication. LSB planes are easy to analyse statistically, especially when the image is nearly full, so the tool deliberately shows its own diff instead of claiming invisibility. PNG output is lossless, but JPEG re-compression, screenshots and chat-app re-encoding will destroy a payload. Sensitive text should be encrypted before embedding.

What this tool does not do

  • PNG-only: JPEG, WebP and screenshots are lossily re-encoded by canvas and cannot preserve a payload through re-saves.
  • Text payloads only; arbitrary binary files and other tools' stego containers are not supported.
  • The DTS1 framing and MSB-first bit order are this tool's convention, not an interchange standard.
  • 16-bit and palette PNGs are converted to 8-bit RGBA by the browser canvas; ICC profiles may shift colour values.
  • No encryption, steganalysis evasion or detection is included; high fill ratios remain detectable.
  • Images above 20 megapixels are allowed with a warning but can take seconds and significant memory to encode.

How to use this tool

  1. Load a lossless image

    Choose a PNG or drop one on the Image panel. Check the reported dimensions, bit depth and alpha coverage; sample noise and gradient PNGs are available when you just want to explore.

  2. Type the message

    Enter text in the embed tab. The meter counts UTF-8 bytes (a Turkish 'ü' or an emoji costs more than one byte) and warns above 90% fill.

  3. Pick channels and embed

    Use RGB for the most capacity or red/blue only for a smaller footprint. Run the embed action, then inspect the diff stats and amplified view.

  4. Download and extract later

    Download the <name>-stego.png file, load it back in the extract tab and run extraction. The checksum distinguishes a clean image, a truncated payload and re-encoded corruption.

Use cases

Learn steganography

Inspect a transparent 13-byte header and LSB writer, then compare the amplified diff with the capacity meter to build intuition.

CTF challenge extraction

Probe a challenge PNG for the DTS1 header and read the exact length/checksum diagnostics when a payload looks damaged.

Classroom demonstration

Show how little visual change a hidden message causes, and why even that change is statistically visible at high fill.

Payload framing and channel modes

FieldBehavior
Magic — 4 bytesASCII DTS1; without it extraction reports 'No payload found' rather than dumping random bytes.
Mode — 1 byte1 = RGB, 2 = red only, 3 = blue only; travels in the header so extraction needs no selector.
Length — u32 BENumber of UTF-8 payload bytes; values larger than the image's capacity produce a truncation verdict.
Checksum — u32 BEFNV-1a of the payload; detects silent bit corruption after a lossy re-save or crop.
RGB (default)Three LSB slots per pixel; capacity = floor(pixels × 3 / 8) − 13 bytes.
Red / blue onlyOne slot per pixel; capacity = floor(pixels / 8) − 13 bytes; the other two colour channels are preserved exactly.
Alpha channelNever written, never counted; semi-transparent pixels are reported because older canvas decoders can still perturb RGB.
Bit orderMSB-first per byte, row-major pixel order; a documented constant, not a compatibility guarantee with other stego tools.

The framing is specific to this tool. It does not read steghide, outguess or other tools' containers, and it embeds bytes rather than files.

Common mistakes

Mistake:Saving the result as JPEG or sending it through a chat app.

Fix:Keep the downloaded PNG. Lossy re-encoding changes LSBs; expect a checksum or truncation verdict afterwards.

Mistake:Assuming character count equals capacity.

Fix:The meter uses UTF-8 byte length — accented letters, curly quotes and emoji take multiple bytes.

Mistake:Treating LSB hiding as encryption or as undetectable.

Fix:Encrypt first with a separate tool and read the detectability note; a filled LSB plane is easy to spot statistically.

Mistake:Embedding into an image that already carries a payload.

Fix:Extract or discard the old payload first. A new embed starts from the pristine decoded image and overwrites previous bits.

Mistake:Using a 16-bit or ICC-profiled PNG and expecting perfect fidelity.

Fix:The browser canvas reduces 16-bit channels to 8 bits and may convert colours; warnings are shown at load time, so verify a round-trip.

Frequently asked questions

Does this work on JPEG images?

No. JPEG is lossy: re-compression changes least significant bits and destroys the payload. A JPEG can be loaded for demonstration, but the tool warns that the source was decoded lossily and only the downloaded PNG output is lossless from that point on. Screenshot and chat-app round-trips are equally unsuitable.

How much text can I hide?

The capacity meter tells you exactly: floor(pixels × selected channels / 8) minus the 13-byte header. A 64×64 PNG holds 1,523 bytes with RGB or 499 bytes with one channel. Capacity counts UTF-8 bytes, not characters, so 'ü' or an emoji uses more than one byte.

Can someone detect a hidden message?

Yes — LSB steganography is easy to detect statistically, especially when most of the available bits are used. The tool shows its own diff and warns above 90% fill instead of claiming invisibility. Treat it as a teaching tool, not a way to communicate covertly.

Is the message encrypted?

No. The UTF-8 bytes are written directly into LSBs, so anyone who recognises the header can read them. Encrypt sensitive text with a separate tool before embedding; the framing checksum is an integrity check, not secrecy or authentication.

Is my image or message uploaded?

Nothing leaves the tab. Decoding, embedding, extraction and PNG encoding all happen in the browser with zero dependencies; there is no storage or network request, and reloading the page clears the session.

Why did extraction say 'payload is corrupted' instead of showing text?

The DTS1 magic was found but its FNV-1a checksum did not match, which usually means the PNG was resized, cropped or re-encoded after embedding. A bogus length produces a truncation verdict instead; a clean image simply reports 'no payload found'.

Do I have to remember which channel mode I used?

No. The mode byte is part of the 13-byte header, and extraction probes RGB, red-only and blue-only LSB planes automatically. Red-only payloads therefore cannot be mistaken for an empty image under the default RGB settings.

References & standards