Unicode Character Inspector

See the code point, hex, and category of every character.

Free Unicode character inspector — break any text into its characters and see the code point, hex value, decimal, and category for each. Runs entirely in your browser, nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Why are code points and UTF-16 units different?

Characters above U+FFFF, such as most emoji, are stored as two UTF-16 units (a surrogate pair) but count as one Unicode code point. The summary shows both so you can see where strings will behave unexpectedly.

Unicode character inspector

When text behaves unexpectedly — a string length is off by one, a regex misses an accented letter, or an invisible character silently breaks a comparison — the cause is almost always hidden at the code-point level. This inspector splits any text into its individual Unicode code points and shows the U+ hex value, decimal value, and category of each, making invisible and stray characters immediately visible.

Why string length lies in JavaScript (and many other languages)

JavaScript stores strings in UTF-16, where most characters occupy one 16-bit unit. Characters above U+FFFF — the majority of emoji, and some less common scripts — require two 16-bit units called a surrogate pair. The String.length property returns the number of UTF-16 units, not the number of characters a human sees.

For example:

  • "A".length → 1 (one code point, one UTF-16 unit)
  • "é".length → 1 (one code point, one UTF-16 unit if precomposed)
  • "😀".length2 (one code point, but two UTF-16 units)

This mismatch causes real bugs: a database column sized for 10 characters can silently truncate an emoji, a regex match can split inside a surrogate pair producing garbage, and .slice() can cut an emoji in half. The inspector’s summary shows both the code-point count and the UTF-16 unit count so you can see the gap immediately.

How the inspector classifies characters

The tool iterates text by code point using JavaScript’s for...of loop (which is surrogate-pair-aware), so each emoji counts as one entry. For each code point it:

  1. Reads the code point value with codePointAt(0)
  2. Formats it as U+XXXX (padded to 4 or 5 hex digits)
  3. Classifies it with Unicode property escapes: \p{L} letter, \p{N} number, \p{P} punctuation, \p{S} symbol, \p{M} combining mark, \p{Z} separator
  4. Labels control characters, spaces, tabs, line feeds, and carriage returns explicitly so they become visible

Common debugging scenarios

String length mismatch. Paste the string and compare the code-point count with the UTF-16 unit count in the summary. Any discrepancy indicates astral characters (emoji or rare scripts) that take two units.

Hidden characters. Paste text that refuses to match a known value. The inspector reveals zero-width spaces (U+200B), non-breaking spaces (U+00A0), left-to-right marks (U+200E), and other invisible characters that look like plain spaces but are not.

Combining marks. An accented character can be stored as one precomposed code point (é = U+00E9) or as a base letter plus a combining accent (e + ◌́ = U+0065 U+0301). The inspector shows both as separate rows so you can see whether NFC normalisation is needed.

Copy-paste artefacts. Text copied from PDFs or Word documents often contains smart quotes, soft hyphens (U+00AD), and various punctuation look-alikes. The inspector names each one.

Worked example

Inspecting the string Café — 😀:

CharacterCode pointUTF-16 unitsCategory
CU+00431Letter
aU+00611Letter
fU+00661Letter
éU+00E91Letter
(space)U+00201Separator
U+20141Punctuation
(space)U+00201Separator
😀U+1F6002Symbol

Code-point count: 8. UTF-16 unit count: 9. The emoji is the reason.

Everything runs in your browser — your text never leaves your device.