Invisible Text Generator - Encode Hidden Messages with Zero-Width Characters
Generate invisible text using zero-width Unicode characters. Encode, decode, and detect hidden messages in plain text. Free online tool.
About
Zero-width characters are Unicode code points that occupy no visible space in rendered text. They exist in the Unicode standard for legitimate typographic purposes - U+200B (Zero-Width Space) controls line-break opportunities, U+200C (Zero-Width Non-Joiner) prevents ligature formation in scripts like Arabic and Devanagari, and U+200D (Zero-Width Joiner) forces ligatures or combines emoji sequences. This tool exploits these characters for text steganography: encoding arbitrary plaintext into a sequence of invisible code points that can be embedded within normal visible text. The encoding maps each character's binary representation to a pair of zero-width characters (U+200D → 1, U+200C → 0), separated by U+200B delimiters. The result is a string that appears completely empty to the human eye but carries a full payload when decoded.
A failure to detect zero-width characters in user-submitted content creates real security risks. Invisible strings can bypass naive input validation, smuggle data through chat filters, fingerprint leaked documents by embedding unique invisible watermarks, or break string comparison logic in code. Copy-pasting text from untrusted sources without stripping zero-width characters has caused bugs in production systems. This tool provides three operations: encoding visible text into invisible characters, decoding invisible sequences back to readable text, and detecting the presence and quantity of hidden zero-width characters in any pasted content. The encoding is lossless for all BMP characters (code points ≤ 65535). Note: some platforms strip zero-width characters on paste - test your target platform before relying on this for message delivery.
Formulas
The encoding algorithm converts each character to its binary representation, then maps each bit to a zero-width character:
encode(c) = map(bin(charCodeAt(c)), bit → bit = 1 ? U+200D : U+200C)
For a full message of n characters, the output is the concatenation of each encoded character separated by the delimiter U+200B:
output = encode(c1) + U+200B + encode(c2) + U+200B + ... + encode(cn)
The output length in code points for a single character with code point value v is:
L(v) = floor(log2(v)) + 1
Total invisible string length for n characters:
T = n∑i=1 L(vi) + (n − 1)
Where the + (n − 1) accounts for delimiter characters between encoded character groups.
c = input character, v = Unicode code point value, n = number of characters, L = bit-length of a code point, T = total invisible code points generated.
Reference Data
| Character | Unicode | Name | Width | Purpose | Used In This Tool |
|---|---|---|---|---|---|
| | U+200B | Zero-Width Space | 0px | Line-break opportunity | Character delimiter |
| | U+200C | Zero-Width Non-Joiner | 0px | Prevent ligatures | Binary 0 |
| | U+200D | Zero-Width Joiner | 0px | Force ligatures / emoji glue | Binary 1 |
| | U+2060 | Word Joiner | 0px | Prevent line-break | Detection only |
| | U+200E | Left-to-Right Mark | 0px | BiDi control | Detection only |
| | U+200F | Right-to-Left Mark | 0px | BiDi control | Detection only |
| | U+202A | LR Embedding | 0px | BiDi embedding | Detection only |
| | U+202B | RL Embedding | 0px | BiDi embedding | Detection only |
| | U+202C | Pop Directional Formatting | 0px | BiDi terminator | Detection only |
| U+FEFF | BOM / Zero-Width No-Break Space | 0px | Byte order mark | Detection only | |
| | U+2063 | Invisible Separator | 0px | Math separator | Detection only |
| | U+2062 | Invisible Times | 0px | Implied multiplication | Detection only |
| | U+2061 | Function Application | 0px | Math notation | Detection only |
| | U+180E | Mongolian Vowel Separator | 0px | Mongolian script | Detection only |
| ㅤ | U+3164 | Hangul Filler | Variable | Korean filler | Detection only |
| ᅟ | U+115F | Hangul Choseong Filler | Variable | Korean initial filler | Detection only |