Skip to content
gohacks.dev
Tooling

Unicode Character Inspector

See every code point in a string with its U+ number, category and UTF-8 bytes, and spot zero-width spaces, non-breaking spaces and decomposed accents.

Free · No sign-up · Your inputs stay in your browser

Input

Inspect Unicode code points

Output

11 code points, 22 UTF-8 bytes

CharCode pointCategoryUTF-8Escape
CU+0043Uppercase letter43\u0043
aU+0061Lowercase letter61\u0061
fU+0066Lowercase letter66\u0066
éU+00E9Lowercase letterc3 a9\u00E9
·U+0020Space separator20\u0020
✓U+2713Symbole2 9c 93\u2713
·U+0020Space separator20\u0020
👍U+1F44DEmoji / pictographf0 9f 91 8d\u{1F44D}
🏽U+1F3FDSymbolf0 9f 8f bd\u{1F3FD}
·U+200BFormat (invisible)e2 80 8b\u200B
!U+0021Punctuation21\u0021

NFC composes é into one code point; NFD splits it into e plus a combining accent. macOS file names arrive as NFD, which is a classic cause of 'file not found' on Linux.

Runs in this browser. Nothing you paste is sent to a server.

When two strings that look equal are not

The usual suspects are a zero-width space (U+200B) pasted from a web page, a non-breaking space (U+00A0) from a word processor, a byte order mark (U+FEFF) at the start of a file, and an accented letter stored as a base letter plus a combining mark. All of them make === fail and a database lookup miss.

NFC and NFD

Unicode allows é to be one code point (U+00E9) or two (e followed by U+0301). Unicode Standard Annex 15 defines NFC, which composes them, and NFD, which decomposes them. macOS file systems have historically stored names decomposed. Normalise to NFC on input with PHP's Normalizer::normalize() or JavaScript's String.prototype.normalize() before comparing.

Share

Frequently asked questions

How do I find a zero-width space in my code?
Paste the line here: it shows as a dot with the code point U+200B. In a terminal, grep -P '\x{200B}' finds it, and most editors can be set to render invisible characters.
Why does a character take 3 bytes in UTF-8?
UTF-8 uses one byte for ASCII, two for code points up to U+07FF, three up to U+FFFF and four beyond. The check mark U+2713 needs three.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools