Word counter

Count words, characters, sentences, paragraphs, and reading time in your browser. Whitespace-split words, UTF-16 characters, 200 WPM. Nothing uploaded.

Word counter displays word, character, sentence, paragraph, and reading time statistics as you type. Words are split on whitespace. Characters are UTF-16 code units. Reading time uses 200 words per minute. Nothing is uploaded.

0
Words
0
Characters
0
No spaces
0
Sentences
0
Paragraphs
0
Min read
Text

How it works

  1. Type or paste text. Statistics update automatically as you edit.
  2. View counts. Words, characters, sentences, paragraphs, and estimated reading time are displayed in real time.
  3. All processing is local. The browser computes everything — no server requests.

UTF-16 characters vs whitespace-split words

This page reports six totals from the box as you type. Words are trim() then split(/\s+/). Characters are JavaScript string.length — UTF-16 code units, not Unicode code points and not grapheme clusters. Reading time is Math.ceil(words / 200). The counter does not call Intl.Segmenter, String.prototype.normalize, or a Word / Docs tokenizer. For the how-to, see How to Count Words Online: Whitespace Split. For minutes, see Calculate Blog Reading Time: Words Per Minute.

StatRule hereNot here
WordsNon-empty /\s+/ tokensUAX #29 words, CJK word break, hyphen split
CharactersUTF-16 code units[...s].length code points, graphemes
No spacesSame length after replace(/\s/g, '')Visible glyphs only
Sentences/[.!?]+/, empty chunks droppedIdeographic 。 / ? / !, locale sentence break
ParagraphsNon-empty blocks on /\n+/CR-only breaks, U+2029 paragraph separator
Min readMath.ceil(words / 200)Measured WPM for the pasted text

A grinning-face emoji is two UTF-16 units (one surrogate pair) and one word. NFC é (U+00E9) is 1 unit; NFD é (e + U+0301) is 2 units; both are 1 word. Unspaced CJK such as 你好世界 is 4 units and 1 word. Empty input is 0 across all six stats. Hello!!! is 1 sentence; ??? is 0; Dr. and 3.14 increment the sentence count. Soft-wrapped text with no LF is one paragraph. To compose or decompose before counting, use Unicode NFC / NFD.

Word count in Python and Node

The snippets below count whitespace-delimited words the same way this page does: trim, then split on Unicode whitespace. Node uses the same ECMA-262 split(/\s+/) as the live counter. CPython str.split() with no separator also collapses Unicode whitespace and drops empty tokens. Characters on this page are UTF-16 code units ( string.length). CPython len(s) is Unicode code points — use len(s.encode('utf-16-le')) // 2 to match this page. Neither snippet is UAX #29, a CJK tokenizer, or Microsoft Word. For the whitespace-split how-to, see How to Count Words Online: Whitespace Split.

Node.js with String.prototype.split

Empty input is 0 words, same as this page. Reading time is Math.ceil(words / 200). Characters are UTF-16 code units, so a grinning-face emoji is 2, not 1:

const input = 'hello world';
const words = input.trim() === '' ? 0 : input.trim().split(/\s+/).length;
// 2

input.length;
// 11

Math.ceil(words / 200);
// 1

'😀'.length;
// 2

Python with str.split

CPython str.split() matches this page on the ASCII and CJK strings below. len(s) is code points. A grinning face is 1 there and 2 UTF-16 units on this page:

import math

text = 'hello world'
words = len(text.split())
# 2

len(text)
# 11

len(text.encode('utf-16-le')) // 2
# 11

math.ceil(words / 200)
# 1

len('😀')
# 1
len('😀'.encode('utf-16-le')) // 2
# 2

Unspaced CJK such as 你好世界 is 1 word here, in Node split(/\s+/), and in str.split(). NFC é is 1 unit in both string.length and len(s); NFD é is 2 units in both. CPython has no stdlib sentence splitter that matches this page's /[.!?]+/ and no 200 WPM helper — math.ceil(words / 200) is this page's reading-time rule, not a tokenizer. POSIX wc notes stay in the shell section below.

Word count in the shell

This page counts in the browser as you type. Words are trim() then split(/\s+/). Characters are UTF-16 code units. GNU and BSD wc reads a file or stdin. POSIX wc -w counts nonempty whitespace-delimited words; wc -l counts newline characters, not this page's paragraphs; wc -c counts bytes; wc -m counts locale characters (Unicode code points in a UTF-8 locale). echo hello world appends a newline, so use printf to compare with this page's box. These commands have no sentence split and no 200 WPM reading time.

GNU wc (Linux)

Default wc notes.txt prints newline, word, and byte counts plus a filename. This page has no filename column. Flag order does not change the printed columns: newline, word, character, byte.

# Words (same ASCII token count as this page)
printf 'hello world' | wc -w
# 2

# Newlines — not paragraphs. Two visual lines, one LF:
printf 'hello\nworld' | wc -l
# 1

# Bytes vs locale characters (ASCII: both 11)
printf 'hello world' | wc -c
printf 'hello world' | wc -m

macOS / BSD wc

Apple's wc ships the same short flags ( -w, -l, -c, -m). GNU long options such as --bytes / --chars are not portable. Default output is still lines, words, bytes, filename:

wc -w notes.txt

printf 'hello world' | wc -w
# 2

A grinning-face emoji is 1 word here and in wc -w, 2 UTF-16 units on this page, 1 character in wc -m, and 4 UTF-8 bytes in wc -c. Precomposed é is 1 unit here and 1 wc -m / 2 wc -c bytes; decomposed e + U+0301 is 2 units here and 2 wc -m / 3 bytes. Unspaced CJK such as 你好世界 is 1 word and 4 units here; wc -w is 1, wc -m is 4, wc -c is 12. hello\n\nworld\n is 2 paragraphs here and 3 in wc -l. GNU wc in a UTF-8 locale treats NBSP (U+00A0) as a word break, same as this page's \s. wc does not count sentences or minutes. Windows has no POSIX wc unless you use WSL or Git Bash; PowerShell Measure-Object -Word -Line -Character uses different tokenization. Whitespace-split how-to is in How to Count Words Online: Whitespace Split. Compose or decompose first on the Unicode normalizer.

FAQ

Does this tool upload my text?
No. All counting runs in your browser as you type. Your text is never sent to a server.
How are words counted?
Words are non-empty segments split on Unicode whitespace (spaces, tabs, newlines, and other separators). This matches most natural-language word boundaries.
How is reading time calculated?
Reading time uses 200 words per minute, a common estimate for average adult reading speed. The result is rounded up to the nearest minute.
How are sentences counted?
Sentences are split on ASCII sentence-ending punctuation: periods, question marks, and exclamation points. Abbreviations like "Dr." may increment the count.
Does counting normalize Unicode characters?
No. NFC é (U+00E9) and NFD e + combining acute (U+0301) are counted as different character sequences. Use the Unicode normalizer first if you need consistent counts.

Related