Skip to content

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 tool

This tool processes text on your device. The text is not uploaded.

  • Limits word boundary detection to basic whitespace matching.
  • Memory use scales linearly with input size.

Steps

Paste the sample text

Drop the string whose length metrics you need — including emoji and multi-line content.

Press Run locally

Counts are computed when you run the tool, not while you type. Results cover characters, code points, graphemes, words, and lines.

Read the JSON metrics

Compare UTF-16 length (`characters`) with grapheme clusters when UI or database limits disagree.

How to use Text statistics

Three length layers
  1. UTF-16 code units (characters) — JavaScript .length; surrogate pairs count as two.
  2. Code points (codePoints) — Unicode scalar values; most emoji are one code point but two UTF-16 units.
  3. 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

  1. Enter what you haveType or pick your text. Nothing is submitted anywhere.
  2. It runs in this tabThe calculation happens on your device, using your browser's own data.
  3. 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.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close