A word counter reports how many words are in input text. The tool above runs the count in your browser; nothing leaves your machine. The interesting question is what counts as one word — different tokenizers produce different counts.
The simplest definition
Whitespace tokenization. Split on whitespace; count the resulting tokens.
"The quick brown fox jumps over the lazy dog"
→ 9 words
This works well for English, French, Spanish, German, and most Latin-script European languages. It’s what Microsoft Word, Google Docs, and most code-focused word counters use.
Where whitespace tokenization gets blurry
- Hyphenated words.
well-known— one word or two? Whitespace tokenization says one. - Apostrophes.
don't— one word.rock 'n' roll— three? Four? - Em-dashes.
friend—a true one—...— two distinct words separated by a non-word character. - Numbers.
$1,000— one word. - Hyphenated numbers.
2024-01-15— one word by whitespace; ambiguous by intent. - URLs.
https://example.com/path/to/page— typically one word. - Underscored identifiers.
user_id— one word by whitespace.
Each tool draws the line slightly differently. The tool above uses whitespace tokenization with hyphenated words counted as single words.
What about non-Latin scripts
Whitespace tokenization fails for:
- Chinese, Japanese, Thai. No spaces between words.
今日は晴れですis one whitespace-token but 4-5 actual words depending on the analysis. - German compound words.
Donaudampfschifffahrtsgesellschaftskapitänis one word but linguistically several morphemes. - Arabic, Hebrew with prefixes.
الكتاب(“the book”) is one whitespace token but morphologically a prefix + noun.
For these languages, accurate word count requires linguistic analysis (segmentation), not whitespace splitting. Browser Intl.Segmenter exposes this:
const segmenter = new Intl.Segmenter('zh', { granularity: 'word' });
const segments = segmenter.segment("今日は晴れです");
// → "今日", "は", "晴れ", "です"
Some word counters use Intl.Segmenter when available; some don’t. The tool above uses whitespace tokenization only, so for Chinese, Japanese or Thai text its word count undercounts.
What the tool reports
For input text, the tool above reports:
- Words. Whitespace tokens.
- Characters with spaces. Total character count including all whitespace (emoji count as one character).
- Characters without spaces. Total character count excluding whitespace.
- Lines. Newline-delimited segments. See line counter.
- Sentences. Approximated by counting runs of
.,!and?. Imperfect: abbreviations like “Dr.” or “U.S.” and decimals like “3.14” add false sentences. - Paragraphs. Blocks separated by a blank line.
- Reading time. Words divided by 200 words per minute, rounded up.
When word count matters
- Article writing. Magazine and journal targets are usually expressed in word counts.
- Academic papers. Conference and journal limits.
- Marketing copy. Headline length, tweet length, ad-copy constraints.
- SEO. Page word count is one signal among many; very short pages may rank lower for some queries.
- Translation pricing. Translators charge per word.
- Subtitle translation. Constraints on per-second word count.
Reading time estimation
A rough convention:
| Reader | Words per minute |
|---|---|
| Slow reader | 150 |
| Average reader | 200-250 |
| Fast reader | 300-400 |
| Speed reader | 500+ |
The tool above uses 200 wpm, the low end of the average range, so its estimate errs long. Articles aimed at general audiences typically use 200-250; technical content is read more slowly.
What word count doesn’t capture
- Density. A 500-word academic abstract conveys more information than a 500-word casual essay. Word count is a rough proxy for length, not for content.
- Difficulty. Polysyllabic, technical text reads slower than simple prose. Reading-time estimation assumes average difficulty.
- Visual elements. A 200-word article with 10 images takes longer to consume than a 200-word article without.
- Code. A “word count” of a programming-language source file is rarely meaningful; lines or function counts are better.
Common pitfalls
- Different tools, different counts. Microsoft Word, Google Docs, and command-line
wc -wmay give different counts on the same input by 1-5%. None is “correct”; they use slightly different rules. - CJK text counted as too few words. A 1000-character Chinese passage might be 250-500 words by linguistic analysis but 1 word by whitespace tokenization. Use
Intl.Segmenterfor accurate counts. - Word counts that include hidden text. A document with footnotes, comments, or hidden tracked changes may count those differently than the visible text.
- Counting URL components.
https://example.com/pathis one word by whitespace but might be expected to be more by some intuitions. - Counting punctuation as words. Standalone
?or!(e.g., dialogue) is sometimes counted as a word, sometimes not.
For other text statistics, see character counter, line counter.