About Text Statistics
Character, word, sentence and paragraph counts matter whenever text has to fit a limit: a form field, a varchar column, a translation quote. This tool counts all of these live in your browser, distinguishing characters with and without spaces, splitting words on whitespace, and estimating reading time. For example, paste a 300-word passage and get characters, words, lines, sentences and average word length at once. These numbers answer real constraints. API field limits and database varchar capacity are often enforced in bytes rather than characters: one CJK character is three bytes in UTF-8 against one for ASCII. So a character count alone can mislead when you size columns or trim input. The tool also breaks out Chinese character counts for mixed CJK/English text and distinguishes visible versus whitespace characters. Everything is computed character by character locally, with no caching or upload, so drafts, key fragments, or internal logs stay on your device. Counts refresh instantly as you type, making it a lightweight pre-publish check that helps you avoid "I thought it was long enough" truncation incidents. The most common misuse is comparing numbers produced by different conventions: character counts differ substantially depending on whether spaces and punctuation are included, and splitting on spaces does not work for Chinese at all. Another is reading only totals rather than distributions, where many lines may be blank or many characters repetitive, differences that decide whether the text needs cleaning before counting. Beyond the convention there is another easily missed difference: whether a character means a code point, a grapheme cluster or a code unit, and the three disagree on text containing emoji or combining marks. A family emoji may be seven or eight code points and one grapheme cluster, so establish which meaning of character the other side uses before comparing counts. Line counting has its own conventions. A trailing newline changes the count by one, an empty file may be zero or one line depending on the implementation, and mixed line endings may count as two lines in some tools. Irrelevant on a fifty-line file, these differences directly affect splitting, checksums and reconciliation on data with a million lines, so pinning the convention on a small file first is worth making a habit. Its relation to deduplicated counting is worth stating: raw and deduplicated counts answer different questions, the first measuring volume and the second information. A highly repetitive text has many characters and few after deduplication, which marks it as closer to template assembly than independent writing. Reading both numbers together says more about the text than either alone and is a standard pair in quality checks. In writing and editing, interpret the numbers against the audience. For on-screen reading, sentence and paragraph length are the key measures, since long sentences raise comprehension cost; for search-oriented content, keyword density should read naturally, and pushing it higher reduces readability. The same text has different standards under different goals, which makes statistics an input and judgement a human task. Cleaning before counting is almost mandatory: normalise line endings, trim whitespace and deal with invisible control characters. Counting raw text lets full-width and half-width mixes, zero-width characters and non-breaking spaces shift the result, and none of them are visible in an editor, which makes the discrepancy expensive to chase. Making cleaning the first step keeps every later number trustworthy.
How It Works Internally
The counting convention decides the answer: counting characters with or without spaces and punctuation differs substantially, and word counting depends on the language, since splitting on spaces does not work for Chinese. Different tools therefore legitimately disagree on the same text, so state the convention first and keep it identical when comparing.
The text "你好 world"Character count is 8 with spaces and 7 without; word count split on spaces is 2 — the numbers differ by convention, not by errorMeasured on This Page
| Fixed: CJK sentences were 0 | Sentence counting matched only [.!?], so Chinese 。!? counted for nothing — any Chinese text reported 0 sentences. It now accepts both ASCII and CJK terminators (including full-width !? and …): the measured Chinese case yields 3 |
|---|---|
| Fixed: emoji counted as 2 | Characters used s.length (UTF-16 code units), so astral characters such as emoji counted double. Now code points: the measured mixed text is 38, where the old build reported 41 |
| Bytes correct | UTF-8 via TextEncoder: Chinese is 3 bytes per character and emoji 4 — the 17-code-point Chinese text is 51 bytes |
| Word definition | Split on whitespace (\S+): 12 English words correct; Chinese has no spaces so a whole sentence is 1 word — a definition question for CJK, not a bug |
| Other metrics | Lines (by \n), paragraphs (blank-line separated) and reading minutes (words/200 rounded up, minimum 1) match Python |
Two Chinese-text traps, both now handled: sentence terminators — Chinese uses 。!?, and matching only ASCII [.!?] makes every Chinese text report zero sentences; and character counting — JS length measures UTF-16 code units, so emoji count 2 and ZWJ sequences count even more, while code points ([...s].length) match expectation. The third is a definition question rather than a bug: Chinese has no inter-word spaces, so counting words means one word per sentence — use a dedicated CJK segmenter when real word counts matter.
How to Use
- Open "Text Statistics"
- Paste or type the text you want to measure
- Word, character and line counts update as you type
- Check the totals against the limit you need to meet
- Click "Clear" to measure the next block
Use Cases
- Social limits — Check tweets and bios against platform character caps to avoid truncation.
- SEO snippets — Keep meta titles and descriptions within the ideal display range for search engines.
- Word-rate quotes — Estimate writing or translation effort and fees by word or character count.
- Reading time — Compute an expected reading-minutes figure to display atop a blog post.
- Essay limits — Quickly verify a paper or report meets a required word count.
- Field-length check — Confirm a value will not exceed a varchar byte limit before a database insert throws an error.
FAQ
How are characters counted for CJK text?
CJK scripts are counted by character; whitespace-based word counts are less meaningful for them, so refer to the character total.
What is the difference between counts with and without spaces?
Without spaces reflects actual text volume for strict limits; with spaces is closer to visual length.
What is the difference between UTF-8 bytes and characters?
A CJK character is three bytes in UTF-8 while ASCII is one byte, so byte counts far exceed character counts; size database fields using bytes, not characters.
How is reading time calculated?
It uses a common average pace (about 200-250 words per minute) and is an estimate that varies by reader and difficulty.
Do blank lines count as paragraphs?
Paragraphs are non-empty text blocks; consecutive blank lines are not counted as multiple paragraphs.
Can it report byte size?
This tool focuses on characters and words. For UTF-8 byte counts or encoding conversion, use our related encoding tools.
The word count differs from Microsoft Word — why?
Definitions differ: counting CJK by character vs word, hyphenated English words, whether punctuation counts. The tool lists its criteria; match the definitions before comparing numbers — publication platforms usually count characters excluding spaces.
When do I use characters with vs without spaces?
Social platforms have their own rules (some with, some without spaces); Chinese manuscript counts usually exclude punctuation and spaces; SEO title and description limits count characters including spaces. Match the target platform's rule to the right row.