bitlvl
EN

Unicode inspector

Paste text that looks right but does not match, compare, or sort. The inspector lists each character and flags the ones you cannot see.

Normalise to

Why text that looks identical is not

Unicode has more than 150,000 characters and many of them are invisible or look exactly like another. A string copied from a web page, a PDF or a chat app can carry zero-width spaces, non-breaking spaces, soft hyphens, directional marks and a byte order mark, none of which show on screen, all of which make comparisons, logins and database lookups fail. Look-alikes are worse: the Cyrillic а (U+0430) is pixel-identical to the Latin a (U+0061) in most fonts, which is the basis of homograph phishing domains and of “why does this username not exist” tickets.

What the inspector reports

  • Code point (U+00E9): the number Unicode assigns. One visible character may be one code point (é precomposed) or two (e + combining acute), which is the NFC/NFD distinction.
  • UTF-8 bytes: 1–4 bytes per code point; what is stored in files, databases and HTTP. UTF-16 units: what JavaScript and Java strings count; emoji take two.
  • Graphemes: what a person sees as one character. A flag emoji is one grapheme, two code points, eight UTF-8 bytes.

Normalisation

NFC composes base + mark into a single code point where one exists; NFD decomposes. Compare and store text in NFC (macOS file names arrive in NFD, which is a classic sync bug). NFKC and NFKD additionally fold compatibility characters: ligatures, full-width letters, superscripts and Roman-numeral characters become their plain equivalents, which is what you want for search and identifiers but destroys formatting.

Cleaning input

For identifiers, usernames and domains: normalise to NFKC, strip the characters this tool flags as invisible, and reject or warn on mixed scripts. The “hide invisible” option gives you the cleaned string to copy.

Questions

What is a zero-width space?

U+200B, a character with no width used to mark a possible line break. It survives copy-and-paste and is invisible in almost every editor. Word processors, Slack and some web pages insert it; this inspector flags every one.

Why does "é" sometimes count as two characters?

It can be written as the single code point U+00E9 or as U+0065 e followed by U+0301 combining acute accent. They look the same and compare unequal unless both are normalised to NFC.

How do I type a character by code point?

Linux (GTK): Ctrl+Shift+U, then the hex, then space. macOS: enable the Unicode Hex Input source and hold Option. Windows: type the hex then Alt+X in Word and WordPad. In code: "\u{1F600}" (JS), "\N{...}" or "\U0001F600" (Python).

What is the difference between UTF-8 and Unicode?

Unicode is the catalogue of characters and their numbers. UTF-8 (and UTF-16, UTF-32) is a way of writing those numbers as bytes. UTF-8 is the one used everywhere on the web.