String inspector
Paste any string to see why JavaScript’s .length disagrees with what you see — code points, graphemes, UTF-8 bytes, and invisible characters.
Your data never leaves the browser — inspection runs locally.
~~~
Input
~~~
Counts
- UTF-16 code units (.length)
- Unicode code points
- Grapheme clusters
- UTF-8 bytes
~~~
Script mixing
Hidden characters
- —
Clean copy strips zero-width chars, BOM, and most control chars; NBSP becomes a normal space.
~~~
Character breakdown
| # | Grapheme | Code point(s) | UTF-8 (hex) | Notes |
|---|---|---|---|---|
~~~
About this tool
JavaScript strings are UTF-16. Surrogate pairs (emoji, many CJK characters) count as two “characters” in .length but one visible glyph. Intl.Segmenter approximates user-perceived grapheme clusters — what you'd count when moving the cursor with arrow keys.
Hidden whitespace and homoglyphs cause real bugs: copy-pasted URLs that 404, usernames that look identical but don't match, JSON that parses on one machine but not another.
~~~