What Zero-Width Text Obfuscation Is
Zero-width text obfuscation is a form of steganography — hiding a message inside another message so that only the intended recipient knows the first message exists. Unlike encryption, which makes a message unreadable, steganography makes a message invisible.
The technique uses zero-width Unicode characters: characters that occupy no visual space when rendered. They are invisible in normal text display. But they are real bytes that survive copy-paste, file transfer, and most text processing.
Character Scheme — Explicitly Defined
This tool uses exactly four zero-width characters. Each has a specific role in the payload format:
| Character | Unicode | Role |
|---|---|---|
| Zero-Width Space (ZWSP) | U+200B | Binary 0 |
| Zero-Width Non-Joiner (ZWNJ) | U+200C | Binary 1 |
| Zero-Width Joiner (ZWJ) | U+200D | Start marker |
| Word Joiner (WJ) | U+2060 | End marker |
Payload Format — Byte-Level Encoding
Encoding pipeline:
- Secret message → UTF-8 bytes via
TextEncoderAPI - Each byte → 8 bits (MSB first)
- Each bit → ZWSP (0) or ZWNJ (1)
- Wrap with ZWJ start marker + WJ end marker
- Insert into carrier text after first word
Decoding pipeline reverses this exactly: locate ZWJ start marker, collect 8 bits per byte until WJ end marker, convert bytes to UTF-8 via TextDecoder.
UTF-8 Support — Emoji, Urdu, Multiline
The tool uses the TextEncoder/TextDecoder API, which correctly handles any Unicode content:
| Secret message | UTF-8 bytes | Zero-width chars |
|---|---|---|
Hello | 5 bytes | 40 bits → 40 chars |
مرحبا | 10 bytes (2 per Arabic char) | 80 bits → 80 chars |
😀 | 4 bytes (surrogate pair) | 32 bits → 32 chars |
Hi 👋 World | 13 bytes | 104 bits → 104 chars |
Byte-level comparison — not string comparison — ensures correctness even when JavaScript would treat surrogate pairs as two chars.
Carrier Text Preservation — Verified
After hiding, the tool verifies the visible text is byte-for-byte identical to the original carrier by stripping all zero-width characters and comparing. This check is performed both after encoding and after round-trip decoding. If the visible text is modified, the round-trip reports FAIL.
- Gmail web compose
- Slack messages
- Discord messages
- Twitter/X posts
- Some CMS WYSIWYG editors
- Text sanitizers in messaging APIs
Validation — Clear Errors
Decode mode reports specific errors:
- No start marker found — input contains no hidden payload
- Start marker found but no end marker — payload is incomplete/truncated
- Payload length not a multiple of 8 — data corruption
- Invalid UTF-8 bytes — payload encoding is not UTF-8
Every error includes the specific condition. No silent fallback to garbage output.
Round-Trip Validation
After encoding, the tool automatically:
- Decodes the output back to the hidden message
- Compares byte-for-byte with the original secret via UTF-8 encoding
- Strips zero-width chars from output and compares to original carrier
The results panel shows:
- ✅ Payload recovered — decode matches original secret
- ✅ Carrier preserved — visible text matches original
- ❌ Round-trip FAILED — with specific reason
What This Tool Cannot Do
- It cannot encrypt. Zero-width is encoding, not encryption. Anyone with a decoder can read the hidden text.
- It cannot hide secrets safely. Do not embed passwords, API keys, or tokens.
- It cannot survive every platform. See the strip list above.
- It cannot hide from a hex editor. The Unicode bytes
E2 80 8B(ZWSP),E2 80 8C(ZWNJ),E2 80 8D(ZWJ),E2 81 A0(WJ) are all visible in raw byte inspection. - It cannot protect against deliberate analysis. Anyone who knows about zero-width steganography can extract the payload.
Security Claims — What This Tool Is Not
Real Use Cases
- Watermarking generated content — embed a unique ID for provenance tracking
- Canary tokens — send the same text to N recipients with distinct IDs; a leak identifies the source
- A/B test tracking — tag visible content with the variant ID
- Workflow state — embed approval stage or template version
- Invisible notes — add private annotations to a shared document