Unicode Inspector
Every code point with name, script and bytes, plus hidden characters and look-alikes.
How it works
Breaks text into code points with U+ value, name, general category, script and UTF-8/UTF-16 encoding; counts graphemes; compares NFC/NFD/NFKC/NFKD forms; and flags zero-width and invisible characters, bidirectional controls (Trojan Source) and mixed-script look-alike words used in phishing.
- The text is split into Unicode code points. General category and script come from the JavaScript regular-expression Unicode property tables of the server (\p{gc=…}, \p{Script=…}), which follow the Unicode version of its ICU build.
- Names: the complete Unicode name list is about 2 MB, so a compact built-in table covers ASCII, Latin-1, basic Greek and Cyrillic, all invisible/format/space characters, common punctuation and variation selectors; CJK ideographs, Hangul syllables, fullwidth forms and tag characters are named algorithmically. Other characters show no name.
- Grapheme clusters (user-perceived characters) are counted with Intl.Segmenter. Normalization forms come from String.prototype.normalize.
- Invisible: zero-width characters, format characters (Cf), fillers, variation selectors and tag characters. Bidi controls (U+202A–202E, U+2066–2069) can make source code display differently from how it compiles (CVE-2021-42574, "Trojan Source").
- Look-alikes: words mixing scripts (e.g. Latin + Cyrillic) and characters from a curated subset of Unicode confusables.txt are flagged; the skeleton maps them to Latin for comparison. This is a subset, not the full UTS #39 algorithm.
Sources
- Unicode Standard Annex #44: Unicode Character Database (Unicode Consortium)
- Unicode Technical Standard #39: Unicode Security Mechanisms (confusables) (Unicode Consortium)
- Unicode Standard Annex #29: Text Segmentation (grapheme clusters) (Unicode Consortium)
- Trojan Source: Invisible Vulnerabilities (CVE-2021-42574) (Boucher & Anderson)
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
Related tools
- Hash & HMAC Calculator – MD5, SHA-2, SHA-3, BLAKE2, CRC32 and HMAC of text or files, with checksum compare.
- Passkey & WebAuthn Tester – Test passkeys and decode WebAuthn responses: flags, AAGUID, signatures.
How to use the Unicode Inspector
See every code point in a text with its name, script and bytes, find hidden and bidirectional characters, spot look-alike phishing words and compare normalization forms.
What it is for
Normal-looking text can hide surprises: a Cyrillic "а" inside a brand name, a zero-width space that breaks a search, a right-to-left override that makes code read differently from how it runs. The Unicode Inspector breaks any text (up to 20,000 characters) into its code points. For each one you get the U+ value, name, general category, script and UTF-8 and UTF-16 encoding.
On top of that it counts graphemes (what a human would call characters), compares the four normalization forms (NFC, NFD, NFKC, NFKD) and flags three kinds of risk:
- invisible characters (zero-width, format, filler, variation selectors, tag characters),
- bidirectional controls, the "Trojan Source" problem,
- look-alike letters and words that mix scripts, typical in phishing.
Names come from a compact built-in table, so most emoji show no name. Confusable detection covers a curated subset of Unicode's confusables list, not the full UTS #39 algorithm.
Worked example
pаypal.com, a look-alike domain: 11 code points, 11 graphemes, 14 UTF-8 bytes. Index 1 is U+0430 CYRILLIC SMALL LETTER A (bytes D0 B0), flagged as confusable with Latin "a". Index 6 is U+200B ZERO WIDTH SPACE (E2 80 8B), flagged as invisible. The word "pаypal" mixes Cyrillic and Latin. The escaped form pаypal\u{200B}.com makes the hidden space visible, and the skeleton maps the look-alike back to Latin for comparison.
Trojan Source (access_level != "user // Check if admin "): four bidi controls (U+202E RIGHT-TO-LEFT OVERRIDE, U+2066 LEFT-TO-RIGHT ISOLATE twice, U+2069 POP DIRECTIONAL ISOLATE). trojanSource: true. In an editor, the line can look like a comment, while the compiler sees part of a string.
Café 👨👩👧 ABC: 15 code points but only 10 graphemes, 35 UTF-8 bytes, 18 UTF-16 units. The "é" is e + U+0301 COMBINING ACUTE ACCENT, so NFC shortens the text to 14 code points. The family emoji is three people joined by two ZERO WIDTH JOINERs, which is why two "invisible" characters are reported. NFKC also turns the fullwidth ABC into plain ABC, bringing UTF-8 down to 28 bytes.
How to read the result
- codePoints / graphemes / utf8Bytes / utf16Units: four different "lengths". Databases and APIs often limit bytes or UTF-16 units, while people count graphemes.
- chars: the per-code-point table (the first 500 are listed), with flags such as
invisibleorconfusable. - scripts: how many code points per script. Common covers punctuation and spaces, and Inherited covers combining marks.
- normalization: whether each form equals your input and what it would become.
- findings: invisible characters, bidi controls, confusables and mixed-script words, each with its index.
- escaped: the text with hidden characters written as
\u{…}, safe to paste into a bug report.
Tips and common mistakes
- Not every invisible character is malicious. Zero-width joiners are required inside emoji sequences and some scripts. Judge them by context.
- If two strings look identical but don't compare equal, check normalization first. One is often NFC and the other NFD (common with text from macOS file names).
- NFKC is for search and comparison, not storage. It replaces fullwidth letters, ligatures and superscripts, so information is lost.
- For domain names, a mixed-script word is a strong warning sign. Browsers show such domains in punycode (
xn--…) for the same reason.
FAQ
Why are there more code points than characters?
One visible character (a grapheme) can be built from several code points, such as a letter plus combining accents or emoji joined by ZERO WIDTH JOINERs. The family emoji above is five code points but one grapheme.
What is "Trojan Source"?
It's the name for CVE-2021-42574. Bidirectional control characters reorder how code is displayed, so a reviewer sees something different from what the compiler reads. The inspector flags the controls U+202A–202E and U+2066–2069.
Why do some characters have no name?
The full Unicode name list is about 2 MB, so the tool ships a compact table (ASCII, Latin-1, basic Greek and Cyrillic, invisible and space characters, common punctuation) and names CJK, Hangul and fullwidth forms algorithmically. Code point, category and script are always shown.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://unicodeinspector.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://unicodeinspector.usefulweb.site/mcp· tool nameunicode_inspector
Example request
curl -s -X POST https://unicodeinspector.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"text":"pаypal.com"}'