A web page, an email, a PDF, a pasted string — any of them can carry instructions or data hidden in Unicode that renders as nothing to a human but reads loud and clear to a model: invisible tag characters, bidi overrides, variation-selector payloads, zero-width runs, homoglyph spoofs. invisible-ink finds it, decodes it, and strips it — without mangling real Arabic, Hindi, Thai, or emoji.
Each is a real, documented technique. Click any card to load it into the demo above and watch it get revealed and decoded.
A sanitiser that strips all non-ASCII would catch every attack and destroy the world's text. The hard part is precision on real multilingual content, so invisible-ink is calibrated against FLORES-200: 1,012 professionally-translated sentences in each of 204 languages.
The remaining warnings are genuine mixed-script tokens (a Cyrillic letter inside a Latin word) in transliterated text — flagged, correctly, as confusable, and never as a hard threat.
No model, no network. The detection rules come from the Unicode Character Database, and the context logic is tuned so legitimate international typography (Indic/Arabic joiners, Thai word breaks, CJK variation selectors, emoji ZWJ) is never mistaken for an attack.
Against UCD-generated tables: default-ignorable, bidi controls, variation selectors, scripts, and a 6,712-entry confusables map.
A zero-width joiner inside Devanagari is typography; the same character between two Latin letters is smuggling. Script context decides.
Tag characters map back to ASCII; variation-selector runs decode to bytes. The hidden message is recovered, not just flagged.
Strip the smuggling vectors while leaving legitimate multilingual text byte-for-byte intact.
# a tool returns web/email/document text — clean it before the model trusts it from invisible_ink import scan, sanitize report = scan(tool_output) if report.verdict == "dangerous": log("hidden payload:", report.hidden_text) # the decoded instruction clean = sanitize(tool_output).cleaned # safe to pass on; languages intact
Ships as a library and a CLI:
invisible-ink --reveal "$text" prints the hidden payload; --clean prints the
sanitised text.