zero-width steganography
termKept in this browser · My desk
Hiding bits in text with Unicode characters that draw as nothing, such as ZERO WIDTH SPACE and ZERO WIDTH NON-JOINER, so that two texts look identical but differ in their code points.
Zach Aysan warned journalists in December 2017 that such characters could fingerprint each copy of a leaked text and, unlike older formatting tricks, survive the removal of formatting; he recommended retyping excerpts and filtering text against an allow list. In September 2025 AWS security engineers described the same principle with the invisible Unicode tag characters (U+E0000 to U+E007F) used to smuggle instructions to large language models, and showed that single-pass filters can fail on surrogate pairs.
How it works. A toy scheme maps U+200B to 0 and U+200C to 1, eight characters to a byte: the sequence 01001000 01101001 inserted after a visible word spells 'Hi', and the string grows from 16 to 32 code points and, in UTF-8, from 16 to 64 bytes while looking the same. Real tools add encryption and a start marker. Uses. Covert messaging, per-recipient fingerprints of documents, and prompt injection against language-model applications. Detection. Count code points against the visible characters, list the default-ignorable and tag code points, and strip anything not on an allow list; in languages that store characters as UTF-16, remove orphaned surrogates too and repeat the filter until the text stops changing. The neighbouring technique substitutes lookalike letters or alternative spaces (homoglyphs), which a mixed-script or confusable check finds.
Also known as: zero-width character steganography, zero-width fingerprinting, invisible character steganography, Unicode character smuggling, Unicode tag smuggling, esteganografia de largura zero
Sources
- Zach Aysan, Zero-Width Characters: Invisibly fingerprinting text, 30 December 2017 (read 2026-11-17): the idea from early 2016; presence or absence of one invisible character fingerprints even short text; not removed with formatting; countermeasures for journalists (retype excerpts, compare copies, allow-list filtering)
- Amazon Web Services, AWS Security Blog, Defending LLM applications against Unicode character smuggling, 30 September 2025 (read 2026-11-17): tag block U+E0000 to U+E007F, flag sequences, models reading hidden tags, single-pass Java filters re-creating tags from orphaned surrogates, recursive sanitization
- Stefano Giovanni Rizzo, Flavio Bertini and Danilo Montesi, Fine-grain watermarking for intellectual property protection, EURASIP Journal on Information Security, 12 July 2019 (read 2026-11-17 with a reading tool): one bit per Latin letter by homoglyph substitution and three bits per space; 64-bit mark in 101 characters on average; destroyed by retyping