Skip to the tool

Unicode inspector

MDV Tools

Paste text. Every code point comes back with its bytes, general category, script and the flags that give away a zero-width space or a stray combining mark. The four normalisation forms are counted as well.

Runs on this device Works offline
0 characters
paste text above
How this works

The text is walked with codePointAt, so a surrogate pair counts once. A surrogate with no partner is listed as category Cs and flagged; TextEncoder writes it as the three-byte replacement character EF BF BD, which is what any UTF-8 encoder does, so the UTF-8 total includes those three bytes and the row shows a dash. UTF-8 sizes come from TextEncoder; UTF-16 units are the string's own length, and UTF-16 bytes are twice that, without a byte order mark. Graphemes are counted with Intl.Segmenter at grapheme granularity, the closest a browser gets to what a reader sees as one character; where the browser lacks it the readout shows code points and says so. The four forms come from String.prototype.normalize; the badge appears when the NFC form differs from the input. Lines are counted at CR, LF and CRLF only, not at U+2028 or U+2029.

Category and script come from testing each code point against Unicode property escapes — \p{Lu} through \p{Cn}, and \p{Script=Latin} through \p{Script=Thai} for thirteen common scripts, "other" for the rest — so they are exactly as current as this browser's Unicode tables and no more. Flags such as zero width, bidi control, variation selector and tag come from fixed ranges written in this file. Browsers ship no character name database and vendoring one would weigh more than this whole page, so names are given only for ASCII, the C0 controls, the variation selectors and tags, and about seventy notable invisibles and combining marks listed in the source; every other name shows a dash.

The table stops at 2,000 rows after the filter and says how many it left out; the counts in the two panels always cover the whole text. Input above 500,000 characters is refused rather than attempted, so the tab never hangs. Nothing is uploaded: there is no server in this file.

The Dark button remembers its setting in this browser's local storage. Nothing you type or drop into the page is stored.