StegoToolkit

Whitespace Steganography Hider

Hide text in trailing spaces/tabs, double-spacing, line endings, or indentation. SNOW-style output (not compatible with the real SNOW program). Optional AES-256-GCM.

AES-256
SNOW-Style

Enter Your Cover Text

The text that will carry your hidden message in its spaces, tabs or line endings

Load demo text

Loads a sample cover article + demo secret message

0 lines · Capacity: — bytes

Processed in your browser

Your text is encoded in this browser tab and never sent to a server. Usage statistics may record which options were used, never your text.

How to Hide Data Using Whitespace Steganography (5 steps)

  1. Paste your cover text (an article, source code, an email or a README) or upload a .txt file.
  2. Type the secret message or add a file to hide.
  3. Choose a method — Auto tries Trailing Space/Tab, then Tab Indentation (for code), then Inter-Word, then Line Ending, and uses the first that fits — or the SNOW-style raw format.
  4. Add a password for AES-256-GCM encryption (recommended; not available in the SNOW-style format).
  5. Click Hide in Whitespace and download the stego .txt file. Share the file unchanged.

4 Whitespace Methods — How Each Works and How Much It Holds

MethodMechanismCapacityNotes
Trailing Space/TabSpace = 0, tab = 1 appended at the end of each line80 minus the line length, but never below 1 or above 7 bits per line: 7 bits on a 10-character line, 7 on 50, 2 on 78, 1 on 79 characters or more (a longer line still carries 1 bit)Plain .txt files; easiest to strip with a trim-trailing-whitespace setting
Inter-Word SpacingOne space = 0, two spaces = 1 between words1 bit per gap between wordsProse with many words; double spaces already in the cover are rewritten too
Line Ending (LF/CRLF)LF = 0, CRLF = 1 at each line break1 bit per line breakPlain files; not visible when text is shown normally, visible in a hex view or cat -A
Tab IndentationIndent as spaces = 0, as tabs = 1, same visual width1 bit per line indented 4 columns or moreSource code with 4-column (or wider) indents
AES-256-GCMPBKDF2 with a random salt and IV48 bytes added to the payloadEvery method except the SNOW-style raw format

How the Whitespace Is Used

Every method turns the message into bits and writes each bit as a choice between two whitespace forms that look the same. Ahead of the message the tool writes a 9-byte header ("WSST", version, method, flags, length, checksum), so the Extractor can find the method on its own. For these four methods the header uses 72 bits; the capacity shown is the bits the method offers in your cover minus those 72, divided by 8 and rounded down to whole bytes. The capacity function looks only at the cover text and the method; a file name, compression and a password change how many bytes are stored (the form's capacity bar accounts for them, and a password adds 48 bytes of encryption overhead). The header's length field is 16 bits, so the stored payload — measured after the file-name frame, compression and encryption, not your original message — can be at most 65,535 bytes, whatever the cover size.

Examples from the tool's own capacity function: a 30-line cover text with 50 characters per line holds 17 bytes with Trailing Space/Tab (7 bits per line) and 0 bytes with Line Ending (its 29 line breaks are fewer than the 72 header bits). A 100-word paragraph holds 3 bytes with Inter-Word Spacing. 100 source lines indented 4 columns hold 3 bytes. The SNOW-style raw format spends one bit per line on a tab marker and 32 bits on a length, and has no 72-bit header. For the same 30-line cover: 30 lines × 7 bits = 210 bits; minus 30 marker bits = 180 bits; minus the 32 length bits = 148 bits; 148 ÷ 8 rounded down = 18 bytes.

Which Method to Choose

Trailing Space/Tab holds the most per line and is the one a trim-trailing-whitespace setting removes; use it when the file will travel unchanged. Inter-Word Spacing needs plenty of words and a text that is not reflowed. Line Ending needs one line break per bit, so it suits long, many-line files. Tab Indentation needs code with indents of 4 columns or more: lines indented by 2 columns are skipped, so a 2-space YAML file offers fewer lines than it appears to have.

Auto tries Trailing Space/Tab first, then Tab Indentation for code, then Inter-Word, then Line Ending, and uses the first that fits. If nothing fits it shows the closest method and says how much is missing.

What Is Changed in Your Cover Text

Only whitespace changes, but more than the bits you embed. Trailing Space/Tab changes every line of the file, including lines beyond the message: it removes any trailing whitespace the cover already had and converts CRLF line endings to LF everywhere. Inter-Word Spacing rewrites every gap of one or two spaces up to the end of the message (a gap that was already a double space can become a single space). Line Ending rewrites the breaks the message uses and drops stray carriage returns on those lines. Tab Indentation rewrites the indent of every line it uses and keeps its width, measured in columns with tab stops every 4 columns (a tab after spaces moves to the next multiple of 4); mixed tab-and-space indents were tested for this. For the last three methods, lines or gaps beyond the message are left exactly as they were.

Where It Survives — and What Was Tested

One thing was measured: with Git 2.54 on macOS and default settings, a commit and checkout kept trailing spaces and tabs, double spaces and CRLF line endings byte for byte. With core.autocrlf set to true or input, Git converted CRLF to LF on commit, which would erase the Line Ending method. Everything else in the survival list is what the relevant setting does by design (an editor that trims trailing whitespace on save removes Trailing Space/Tab; a code formatter rewrites indentation). Whether a chat app, Google Docs or a CMS keeps whitespace has not been tested here, and the table says unknown. Copy the text back out of the app and decode it before relying on it; sharing the downloaded .txt file unchanged is the safe route.

Forensic Mode: Decoy Plus Real Payload

Forensic mode adds a two-layer option: a plain-text decoy is written as Trailing Space/Tab and an encrypted real payload as Inter-Word Spacing, both without a header. Someone who decodes the trailing whitespace in the decoy layout gets the decoy; the real layer needs the password and the Extractor's decoy-decode section. This is concealment, not secrecy: both layers can be found by anyone who inspects the whitespace.

Not Compatible with the Real SNOW Program

The SNOW-style raw format borrows SNOW's idea — hidden data in trailing whitespace, each data line starting with a tab marker — but it was written independently: its own bit packing (space = 0, tab = 1 after the marker, a 32-bit length) and no ICE cipher. No file was exchanged with the real snow program in a test, so do not expect files to open in either direction. Use it for puzzles built with this site's tools; for a file made by the real SNOW, use the real program.

Examples

Input: Cover: 30 lines of 50 characters. Message: 'Hi' (2 bytes). Method: Trailing Space/Tab.

Result: The message needs 72 header bits + 16 payload bits = 88 bits; each line offers 7, so 13 lines receive trailing spaces and tabs.

Meaning: The text looks the same on screen; cat -A shows the trailing spaces and tabs.

Input: The same 30-line cover with a 20-byte message.

Result: Refused: the header plus 20 bytes need 232 bits, the cover offers 210 (capacity 17 bytes).

Meaning: The capacity shown is exact; a message one byte over it is refused with the number of missing bits.

Input: A 2-space-indented YAML file with the Tab Indentation method.

Result: Lines indented by 2 columns are not used and are left untouched; only lines indented 4+ columns carry bits.

Meaning: The indent width of every line stays the same, so the file's structure is unchanged.

Input: A cover text with two spaces after every full stop, Inter-Word Spacing.

Result: Those gaps are rewritten along with the single-space gaps, and the Extractor reads the message back.

Meaning: Earlier versions shifted every bit after an existing double space; this is fixed.

How the Whitespace Hider Works

1. Prepare the payload

The message is optionally compressed with deflate, then encrypted with AES-256-GCM if you set a password.

2. Add the header

A 9-byte WSST header records the method, flags and payload length, with a CRC-8 over the header.

3. Write bits as whitespace

Each bit is written as a space or tab, a single or double space, an LF or CRLF, or spaces or tabs of equal width, depending on the method.

4. Check

If the message needs more bits than the cover offers, nothing is produced and the shortfall is reported. Everything runs in your browser tab.

What the results mean

ResultWhat it meansWhat to do
Whitespace writtenThe stego text holds the header and message.Download the .txt file and share it unchanged.
Not enough capacityThe message needs more bits than the method offers in this cover.Add lines or words, shorten the message, compress, or pick another method.
Payload too largeThe length field holds at most 65,535 bytes after compression and encryption.Hide a smaller file.

Limitations

  • Whitespace is the most fragile hiding place: anything that trims, collapses or re-flows text can erase it.
  • Only Git (default settings) was tested for survival. Web apps, chat apps and document editors have not been.
  • A reader who shows whitespace, or a script that counts trailing spaces, double spaces or CRLF, finds it at once; encryption hides the content, not the presence.
  • The capacity is small: a 30-line, 50-character-per-line cover holds 17 bytes. For anything large use an image method.
  • The SNOW-style raw format is not interchangeable with the real SNOW program.

Privacy

Your cover text, message and password are processed in this browser tab and are never sent to a server. Usage statistics may record which options were used, never your text. Your host's request log sees the page request as for any website.

Which Tool Next?

Frequently Asked Questions

Is the SNOW-style mode compatible with the real SNOW program?

No. It uses the same general idea — hidden data in trailing whitespace, each data line starting with a tab — but its own bit packing and no ICE cipher, so do not expect files to be interchangeable in either direction (no file was exchanged with the real program in a test). Because there is no header it also cannot be encrypted here.

Can whitespace steganography be detected?

Easily, by anyone who looks: cat -A, an editor's 'show whitespace' mode or git diff --check reveals trailing spaces and tabs, a script can count double spaces, and a hex view shows CRLF. Encryption keeps the message unreadable but does not hide that something is there.

How much can I hide?

Very little. A 30-line cover with 50 characters per line holds 17 bytes with Trailing Space/Tab; a line of 79 or more characters carries only one bit (the least a line can carry). The most this format can store in any cover is 65,535 bytes, and an AES password adds 48 bytes of overhead.

Why does my editor strip the whitespace?

Many editors can trim trailing whitespace on save, and some do so by default through extensions or project settings. Keep the downloaded .txt file as it is and share it as a file; do not open and re-save it.

Can I use it with Git?

In our test with Git 2.54 and default settings a commit and checkout kept trailing whitespace, tabs, double spaces and CRLF unchanged. With core.autocrlf=true or input Git converts CRLF to LF on commit, which erases the Line Ending method, and a whitespace-fixing hook or editor would remove trailing spaces. Check your own configuration.

Why was my message refused?

The method does not offer enough bits in this cover. Add lines or words, shorten the message, enable compression, or try another method. Only the lines or gaps the method really uses count — for example, lines indented under 4 columns do not count for Tab Indentation.

Is my text uploaded anywhere?

No. Encoding and encryption run in your browser tab. Usage statistics may record which options you used, never your text or password.

Related Tools