Count words, characters and sentences

Summarize one text using explicit whitespace, punctuation, blank-line, and UTF-16 counting rules.

freeworks offlinenothing uploaded
ToolWord Counter
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Whitespace runs define words, .!? runs define sentences, blank-line runs define paragraphs, and CRLF or LF defines physical lines. JavaScript length supplies UTF-16 units, while cleaned ASCII word forms produce unique-token, type-token-ratio, and hapax counts.

  • Short, medium, and long buckets mean at most 4, 5–8, and at least 9 UTF-16 units, including punctuation attached to a token.
  • Unicode UAX #29 provides linguistic boundary algorithms, but this deterministic summary does not choose a locale or dictionary.

Worked example

Paragraph Analysis
Analyze a short paragraph and get word count, sentence count, and more
Input
											The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.
										
Output
												BASIC
Characters: 85
Characters no spaces: 69
Words: 17
Unique words: 16
Sentences: 2
Paragraphs: 1
Lines: 1

AVERAGES
Word length: 4.06
Words per sentence: 8.5
Sentences per paragraph: 2
Syllables per word: 1.24

DISTRIBUTION
Short words: 11
Medium words: 6
Long words: 0

VOCABULARY
Richness: 0.941
Hapax legomena: 15
											

When to use this

Submission forms check approximate limits, editors compare English sentence lengths, and corpus exercises calculate type-token ratios and hapax counts.

Edge cases

  • Chinese prose without whitespace counts as one word even when a reader recognizes several lexical words.
  • 😀 adds two to the character total because that field measures UTF-16 units rather than code points or graphemes.
  • Mr. Smith creates a sentence boundary at the abbreviation period, while a newline alone does not end a sentence.

References