Text statistics
InspectExperimentalLimited support. Verify anything critical.
Text statistics counts UTF-16 characters, Unicode code points, grapheme clusters, whitespace-delimited words, and line breaks after you press Run locally. Use it to compare JavaScript string length with user-perceived characters and to inspect multi-line structure before publishing copy or page metadata.
Skip to the toolThis tool processes text on your device. The text is not uploaded.
Steps
Paste the sample text
Press Run locally
Read the JSON metrics
How to use Text statistics
Three length layers
- UTF-16 code units (
characters) — JavaScript.length; surrogate pairs count as two. - Code points (
codePoints) — Unicode scalar values; most emoji are one code point but two UTF-16 units. - Grapheme clusters (
graphemes) — what a reader sees as one character, including ZWJ sequences.
When to run
Paste the text, then press Run locally. Counts update after that action, not on every keystroke.
How it works
- Enter what you haveType or pick your text. Nothing is submitted anywhere.
- It runs in this tabThe calculation happens on your device, using your browser's own data.
- Take the resultRead the text, then copy or download.
Reimplemented locally. Not derived from IT-Tools source.
- Basis
- independent
- Licence
- MIT
- Last reviewed
Frequently asked questions
What is the difference between UTF-16 code units, code points, and grapheme clusters?
UTF-16 code units reflect standard JavaScript string length (where surrogate pairs count as 2). Code points represent individual Unicode scalar values. Grapheme clusters represent human-perceived visual characters (e.g. complex emojis with skin-tone modifiers or zero-width joiners).
How are words counted?
Words are calculated by trimming whitespace and splitting on consecutive whitespace sequences (\s+). Hyphenated compounds (e.g. 'state-of-the-art') count as a single word.
How does the tool count multi-line text and different newline formats?
The line counter handles Unix (\n), Windows (\r\n), and classic Mac (\r) line terminators consistently, reporting the total number of non-empty and empty lines.