How it works
- PasteSource code, a pull-request diff, a contract, a config or a prompt you were handed.
- Read the verdictClean, review, or suspicious, plus a table with the line and column of every finding.
- Inspect or removeThe marked text shows each hidden character as U+XXXX in place. One button removes them all.
What it detects
| Group | Code points | Risk |
|---|---|---|
| Bidirectional controls | U+202A–202E, U+2066–2069 | High: can make code display differently from how it executes |
| Unicode tag characters | U+E0000–E007F | High: invisible ASCII that can hide text |
| Variation selectors (supplement) | U+E0100–E01EF | High: can carry hidden data |
| Direction marks | U+200E, U+200F, U+061C | Medium |
| Zero-width characters | U+200B–200D, U+2060, U+FEFF | Medium: usually copy-paste residue |
| Invisible formatting | U+00AD, U+180E, U+2061–2064 | Medium |
| Control characters | U+0000–01F, U+007F–009F (not tab or newlines) | Medium |
| Unusual spaces | U+00A0, U+202F, U+2000–200A, U+3000 | Low |
Joiners and variation selectors that are part of a normal emoji (a family or a heart with its presentation selector) are recognised and ignored, so emoji don’t trigger false alarms.
Why this matters for security
Trojan Source. In 2021, researchers at the University of Cambridge described how bidirectional control characters inside source code can make a program display one way and execute another, so a reviewer reads harmless logic while the compiler sees something else. It was assigned CVE-2021-42574, and many compilers, editors and code hosts now warn about it. But code that arrives as pasted text, a chat message, a patch file or an audit-report snippet doesn’t always pass through those warnings.
Hidden instructions for AI assistants. Unicode tag characters map onto invisible copies of ASCII letters. Text that looks empty can therefore contain a sentence that some language models will read. If you paste untrusted code or documents into an AI assistant, scanning them first is a cheap precaution.
Hidden payloads. Variation selectors and other invisible code points have been reported as a way to smuggle data inside otherwise normal-looking source in supply-chain attacks. A scan takes a second.
A practical routine for reviewers and auditors
- Before reading a file or diff that came from outside, paste it here. Any high finding deserves a manual look.
- Use the line and column to jump to the exact spot in your editor.
- Scan contracts, build scripts and CI configs, not only application code.
- Before sending text to an AI assistant, scan it for tag characters.
What it does not do
- Homoglyphs. Look-alike letters (a Cyrillic “а” that looks like a Latin “a”, CVE-2021-42694) are visible characters and are not flagged.
- It doesn’t analyse logic. A file with no hidden characters can still be malicious.
- It isn’t a substitute for linters or compiler warnings. It is a quick extra check.
FAQ
Is a zero-width space always malicious?
No. Most are accidents from copying text out of web pages, documents or chat apps. That is why they are rated medium: harmless in prose, worth removing in code. The high-risk groups are the bidirectional controls, tag characters and the variation-selector supplement.
What is Trojan Source?
An attack described in 2021 (CVE-2021-42574) that uses Unicode bidirectional control characters to make source code appear different from what actually runs. This checker flags every such character.
Can it remove the hidden characters?
Yes. “Remove hidden characters” deletes everything it flagged and converts unusual spaces to regular ones, keeping emoji sequences intact. Review the findings first if the code is untrusted.
Does it find look-alike letters (homoglyphs)?
No. Those are normal visible characters from another alphabet. This tool is about invisible and direction-changing characters.
Is my code uploaded anywhere?
No. The scan runs in your browser. There is no server and nothing is stored.