What is Text Statistics?
Text Statistics reports grapheme clusters, Unicode code points, UTF-16 code units, words, lines, and UTF-8 bytes. This separates the characters a user perceives from the storage units a program counts. Emoji sequences, skin-tone modifiers, and combining marks are grouped as graphemes for interface limits, database fields, and encoding diagnostics. Common workflows include the following. Compare visible-character and byte limits for an input field. Understand why emoji or combined characters have different lengths. Measure words, lines, and UTF-8 size in multilingual copy. The page also documents input boundaries, output behavior, and practical cautions so you can review the result before putting it into an application, configuration, test, or production workflow.
When to use it
- Compare visible-character and byte limits for an input field.
- Understand why emoji or combined characters have different lengths.
- Measure words, lines, and UTF-8 size in multilingual copy.
How to use it
- Paste or type text.
- Count it with Unicode-aware browser APIs.
- Compare grapheme, code point, word, line, and byte totals.
- Load one of the realistic examples first to verify the selected options and processing direction before replacing it with your own data.
- Review the output, status message, and documented limits; copy, download, or continue only after the result matches your expectation.
Runnable examples
The “Example 1” and “Example 2” buttons load the matching inputs. They cover different structures, directions, or boundaries and can be run directly in the workspace.
Example 1
JSONLane version 1.5
Counts English, 中文, emoji 👍🏽, and the combining character é.
Inputs stay in this browser.Example 2
First paragraph has words and the number 2026.
Second line has punctuation, tabs and 🚀.
One final line.Input rules
- Input may contain any ordinary text.
- Segmentation results depend on the browser's Unicode data.
- Text beyond the displayed character limit is rejected.
- Text input is counted before processing and is limited to 1,000,000 characters on this page; file modes apply the separate file limit shown in the workspace.
- Word segmentation follows the browser's Unicode and locale data.
Output rules
- Graphemes approximate user-perceived characters.
- Code points, UTF-16 units, and UTF-8 bytes are counted separately.
- Line counting recognizes LF, CRLF, and CR separators.
- Output reflects only the current input, direction, and options; rerun after changing a mode or value instead of treating an earlier result as current.
- Line count recognizes LF, CRLF, and CR separators.
Limitations and cautions
- Word segmentation follows the browser's Unicode and locale data.
- Line count recognizes LF, CRLF, and CR separators.
- UTF-16 code units are included for developer comparison, not as a user-visible character count.
How your data is handled
Segmentation and byte encoding run locally; the text is not uploaded or written to browser storage.