Character Inspector
Each character's code point, UTF-8 bytes and type, with counts of characters, code points and bytes; spaces, tabs and invisible characters shown; normalise to NFC, NFD, NFKC or NFKD, and compare two strings; repair garbled text (café), see text read in other encodings, and convert domain names to and from Punycode.
About this tool What it's for, how to use it and an example
What it's for
Look at text one character at a time: each character’s Unicode code point, its UTF-8 bytes and what kind of character it is. It finds invisible and look-alike characters, and explains why two strings that look the same don’t match.
For example, when a password, file name or search won’t match although it looks right, paste it here to find a hidden space, a curly quote, or an accent stored as two characters.
How to use it
Type or paste text. A table lists every character with its code point (such as U+00E9), UTF-8 bytes and type, and the summary counts characters as displayed, code points, UTF-8 bytes and UTF-16 units. It also says whether accents are stored composed (NFC) or decomposed (NFD), and whether it has compatibility characters such as fi or full-width letters. The convert buttons switch between the forms: NFC and NFD only change how accents are stored, while NFKC and NFKD also replace compatibility characters with plain ones (fi becomes fi, ² becomes 2), which changes the text.
Under the table, the text is shown again with each space as ·, each tab as → and other invisible characters named in brackets, such as [NBSP] for a non-breaking space or [ZWSP] for a zero-width space; spaces at the end of a line are highlighted, and lines indented with both tabs and spaces are counted. Paste a second string into Compare with other text to see whether the two are identical, equal once normalised, or different, and the first code point where they differ.
Repair garbled text fixes text whose UTF-8 was read as Windows-1252 or Latin-1, the usual cause of café for café and – for a dash, even when it’s happened twice. Read in another encoding shows what the text’s bytes look like to a program that reads them as Windows-1252, Mac OS Roman, UTF-16 and others, to work out which mistake a garbled file has suffered. International domain names converts a domain such as bücher.example to its Punycode form xn--bcher-kva.example, the form DNS and certificates use, and back.
Example
Type this:
café
The summary reads 4 characters as displayed, 4 code points, 5 UTF-8 bytes, and é is U+00E9, two bytes in
UTF-8. Choose Convert to decomposed (NFD) and it becomes 5 code points: an e followed by a combining accent.
It looks identical, which is why such strings don’t match.
Good to know
macOS often stores file names decomposed, while most other text is composed. That’s a common reason for file names that look identical failing to match in scripts. Normalisation doesn’t ignore case or strip accents, so Café and cafe stay different. Text typed or pasted into the box always has plain line breaks; to see a file’s Windows (CRLF) or old Mac (CR) line endings, open it in the Encoding Fixer, which also repairs a whole file, or text where only some characters are garbled, and saves it as UTF-8.
Guides: Fixing garbled text · Why is Git ignoring my file (or not ignoring it)?
| Character | Code point | UTF-8 | Type |
|---|
Spaces and invisible characters
Compare with other text
Read in another encoding
International domain names
Built with The third-party code and data this tool uses, and their licences
This tool uses no third-party code or data of its own: its code was written for this site.
Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.