By Docify

How to Count Words Online: Whitespace Split

• 5 min read

To count words online, paste the text into a browser tool that splits on whitespace. Docify trims the string, splits on one or more spaces, tabs, or line breaks, and reports characters, sentences, paragraphs, and Math.ceil(words / 200) minutes. Hyphenated twenty-one and CJK with no spaces such as 你好世界 are each one word. Characters are UTF-16 code units. The counter does not call String.prototype.normalize. Character of NFC é (U+00E9) produces 1 unit. Character count of NFD e + U+0301 is 2 units. Both are 1 word. Compose e + U+0301 to é (U+00E9) on /unicode-normalize/. Sentences split on ASCII [.!?]+ only: 你好。世界。 is 1 sentence, Hello with no terminator is 1, and ??? is 0. Paragraphs split on LF only: hello plus a lone CR plus world is 2 words and 1 paragraph. Nothing is uploaded.

Essays, captions, and drafts often have a word or character limit. You do not need a desktop app: the browser already has string length and a split method. The steps below use those, then point at the live word counter.

How to count words in three steps

Step 1: Copy the text you want measured

Copy from an editor, email, or notes. Docify counts everything in the box — there is no option to skip headings or footnotes — so paste only the span you care about.

Step 2: Paste into the word counter

Open the Docify word counter and paste. Counts update as you type. The page does not upload the text.

Step 3: Read the six totals

You get words, characters, characters without whitespace, sentences, paragraphs, and minutes to read. There is no average-word-length stat.

What each number means

Words

After trim, the string is split on /\s+/. Hyphenated forms such as twenty-one and contractions such as don't are one token because they contain no whitespace. CJK text with no spaces is one word. This is not the same tokenizer Microsoft Word or Google Docs use.

Characters

The full count is input.length. The no-spaces figure is that string with all whitespace removed. Both are UTF-16 code units, so some emoji and uncommon scripts count as two units. The counter does not call String.prototype.normalize. Character of NFC é (U+00E9) produces 1 unit. Character of NFD é (e + U+0301) produces 2 units. NFC normalization e + U+0301 → é (U+00E9) as normalized.txt is /unicode-normalize/.

Sentences and paragraphs

Sentences split on [.!?]+ (one or more ASCII periods, question marks, or exclamation points). Empty chunks are dropped, so Hello!!! is 1 sentence and ??? is 0. Hello with no terminator is 1. Abbreviations such as Dr. and decimals such as 3.14 increment the count. Ideographic 。 and fullwidth ? / ! do not split, so 你好。世界。 is 1 sentence. Paragraphs are non-empty blocks split on one or more LF characters (/\n+/), not CR. hello\nworld is 2 paragraphs. hello\rworld is 2 words and 1 paragraph. hello\r\nworld is 2 paragraphs because the LF splits and output CR is trimmed. Unicode line/paragraph separators U+2028 / U+2029 also split words but not paragraphs.

Reading time

Minutes are Math.ceil(words / 200). Empty text is 0. One word is 1 minute. See the reading-time guide for the formula and what the tool does not add.

UTF-16 length is not NFC

e + U+0301 → é (U+00E9) on /unicode-normalize/

The character tile uses input.length and never calls String.prototype.normalize. That is not the encoded text in/unicode-normalize/. The sample there fills é (e + U+0301); NFC normalization produces é (U+00E9) as normalized.txt. Those two strings look the same when rendered. Character count of NFC é is 1 unit. Character count of NFD é is 2 units. Both are 1 word, 1 sentence, and 1 minute. There is no pre-filled demo on /word-counter/. The NFC vs NFD vs NFKC guide is /blog/nfc-vs-nfd-vs-nfkc/.

é → 1 unit · e + U+0301 → 2 units · output is /unicode-normalize/

When a browser count is enough

Draft limits

Essays and blog posts usually care about whitespace-delimited words. Use the same paste if a client or teacher will re-count in Word — the totals can differ slightly.

Character limits

Social posts and meta descriptions often cap characters. Docify shows length with and without whitespace. It does not apply a platform-specific remaining-count UI.

Count words in the browser

Paste text and the counts update in the browser: words split on Unicode whitespace, characters as UTF-16 code units with and without spaces, sentences on ASCII [.!?], paragraphs on line breaks, and reading time at 200 words per minute rounded up. Nothing is uploaded.

Use Word Counter →

FAQ

How are words counted?
Words are non-empty segments split on Unicode whitespace (spaces, tabs, newlines). The count updates as you type.
Does this tool upload my text?
No. All counting runs in your browser using JavaScript. Your text is never sent to a server.
How is reading time calculated?
Reading time uses 200 words per minute, a common estimate for average adult reading speed, rounded up.
How are characters counted?
Character count uses JavaScript string length (UTF-16 code units). Emoji and some special characters count as 2.
Does it count sentences accurately?
Sentences are split on . ? ! punctuation. Abbreviations like "Dr." may be counted as sentence endings.

Related