DevTools Logo

Zero-Width Character Detector

Zero-Width Character Detector

Audit pasted text for invisible characters, bidi attacks and homoglyphs — locally.

Runs in your browser
Try an example

Text to audit

Sanitized output & report

Nothing scanned yet

Paste text or load an example to see the audit.

Examples

Watermarked text

Input
Hel​lo‌ wor​ld
Output
Suspicious — 3 findings; sanitized: Hello world

Three invisible characters are reported with positions and removed together.

Trojan Source

Input
var x = "admin"; ‮ return "root";
Output
U+202E — bidi-attack

The override is flagged as a code-reordering risk before review.

Spoofed name

Input
аpple support
Output
HOMOGLYPH → a

A Cyrillic lookalike of Latin a is flagged with its position.

About this tool

Invisible characters can watermark text, spoof usernames or reorder source code without changing what a reader sees. This detector audits a pasted string for the risky subset of Unicode: zero-width spaces and joiners, bidirectional overrides and isolates, soft hyphens, variation selectors, tag characters and common Latin/Cyrillic/Greek homoglyphs.

Every finding lists its code point, UTF-16 index, category and risk. A verdict banner separates clean text from suspicious text, and the sanitizer can remove whole categories at once or replace homoglyphs with their ASCII lookalikes. A byte counter shows how much the cleanup changed, and a CSV report makes the audit easy to attach to a ticket.

The tool runs entirely in your browser. Its homoglyph list is a curated set of high-frequency spoof pairs rather than the full TR39 confusables database, and the optional zero-width steganography readout is best-effort: no detected pattern is not proof that text was never watermarked.

What this tool does not do

  • The homoglyph list is curated and does not implement full TR39 confusable folding.
  • Steganography decoding covers only the ZWSP=0 / ZWNJ=1 scheme and drops trailing partial bytes.
  • Input is capped at 1 MB and the report shows at most 50 positions per pass.

How to use this tool

  1. Paste text

    Type or paste a patch, manuscript, username or message into the audit panel.

  2. Read the verdict

    A green banner means no targets were found; otherwise counts and high-risk bidi warnings appear immediately.

  3. Choose what to remove

    Use the category checkboxes to keep meaningful joiners or variation selectors, and enable homoglyph replacement if you want ASCII lookalikes.

  4. Export the result

    Press Remove all to clean the source, copy the sanitized text, or download the CSV audit report.

Use cases

Security review

Check a pasted patch for bidi overrides and invisible controls before approving a change.

Plagiarism and submission checks

Look for zero-width fingerprints that some writers use to mark or hide generated text.

Username moderation

Spot homoglyph spoofing where a Cyrillic or Greek letter stands in for Latin text.

Publishing cleanup

Strip invisible watermarks from text before republishing it in a CMS.

Detection categories

CategoryExamples and risk
Zero-widthU+200B, U+200C, U+2060 — common watermark carriers
JoinerU+200D — often legitimate in emoji; removal can break emoji sequences
BidiU+202A–U+202E, U+2066–U+2069, U+061C — reordering / Trojan Source risk
FormatU+00AD, U+FEFF, U+2061–U+2064; strict mode adds Hangul fillers and Braille blank
Variation / tagU+FE00–U+FE0F and U+E0000–U+E007F; VS16 is normal in many emoji
HomoglyphCurated Cyrillic and Greek lookalikes with a suggested Latin replacement

Positions are UTF-16 indices because that is how JavaScript strings are indexed.

Common mistakes

Mistake:Removing every ZWJ and VS16 from emoji-rich text.

Fix:Leave Joiners and Variation selectors unchecked when the text contains emoji; both are meaningful in emoji sequences.

Mistake:Treating any ZWSP/ZWNJ sequence as a decoded message.

Fix:The stego readout is a best-effort curiosity feature; a missing pattern does not prove cleanliness.

Mistake:Assuming the homoglyph list covers every Unicode confusable.

Fix:The map is curated for high-frequency Latin/Cyrillic/Greek lookalikes, not full TR39 skeleton folding.

Frequently asked questions

What are zero-width characters used for?

They are valid Unicode formatting characters: ZWJ joins emoji into a single symbol, ZWNJ is meaningful in several Indic and Middle Eastern scripts, and variation selectors change glyph style. The same invisibility makes them useful for watermarking text, hiding messages or making usernames look identical. The detector categorises each hit so you can keep legitimate uses and remove the rest.

How do I remove zero-width spaces from text?

Paste the text, read the verdict and category counts, then press Remove all. The sanitizer drops the selected categories from the source and shows the byte difference. If your text contains emoji, uncheck Joiners and Variation selectors first so emoji sequences stay intact; you can also copy the sanitized text without changing the original.

What is a Trojan Source attack?

It is a trick that embeds bidirectional control characters such as U+202E in source code so the rendered order differs from the logical order a compiler sees. A reviewer can approve code that appears harmless. This tool flags bidi overrides and isolates as high risk and shows the code point and position of each one.

Why do usernames with invisible characters get flagged?

Because a Cyrillic а or Greek ο can look identical to Latin a or o, and zero-width characters can be inserted without changing the visible name. That enables impersonation. The homoglyph pass lists lookalike characters with their suggested Latin replacement; it uses a curated high-frequency map, not the complete Unicode TR39 dataset.

Can it decode zero-width steganography?

It can show a possible payload for the common scheme where ZWSP means 0 and ZWNJ means 1: bits are collected in encounter order and whole 8-bit groups are shown as hex, with trailing partial bits discarded. This is display-only. No pattern found means only that this scheme was not present, not that the text cannot carry hidden data.

Does my text leave the browser?

No. Scanning, sanitizing, the highlighted view and the CSV download all happen in the tab. Nothing is uploaded or stored, so sensitive code, drafts and manuscripts stay on your device.

References & standards