0
Words
0
Characters
0
No Spaces
0
Sentences
0m
Read Time
0m
Speak Time
✍️ How the Word Counter Works
Word counting uses regular-expression tokenisation to split text into meaningful units, and reading-speed research for the time estimate.
Words = text.trim().split(/\s+/).filter(Boolean).length
Characters = text.length (or text.replace(/\s/g,'').length without spaces)
Sentences = text.split(/[.!?]+/).filter(s => s.trim()).length
Read Time = Math.ceil(words / 200) // 200 wpm average adult reading speed
1
The text is trimmed to remove leading/trailing whitespace, then split on any sequence of whitespace characters (
\s+). Empty tokens are filtered out.2
Sentences are detected by splitting on terminal punctuation (
. ! ?) and counting non-empty fragments.3
Reading time uses the research-backed average of 200 words per minute for silent reading. The result is rounded up to the nearest minute.
Example: "The quick brown fox jumps over the lazy dog."
Words = 9 | Characters = 44 (with spaces) | Sentences = 1 | Read time = <1 min
Words = 9 | Characters = 44 (with spaces) | Sentences = 1 | Read time = <1 min
All processing is local — your text never leaves your browser.