How are characters, emoji, and spaceless scripts counted?
JavaScript’s built-in .length property counts UTF-16 code units rather than visible characters, which inflates character totals on emoji, accented letters, and non-Latin scripts. This word counter lets you count words and characters without uploading text, using browser-native Unicode segmentation so totals match what human readers see on screen.
Grapheme clusters vs UTF-16 string length
Under Unicode Standard Annex #29 on Text Segmentation, a single user-perceived character is a grapheme cluster that may combine multiple code points, such as a base letter plus a combining accent or a family emoji joined by zero-width joiners. Calling .length in plain scripts often reports 2 to 7 units for one visible emoji.
This tool passes your input through Intl.Segmenter with granularity: "grapheme" to compute both Characters and Without spaces (excluding whitespace-only segments). Even complex flag or skin-tone emoji count as 1 character instead of skewing social-media or meta-description limits.
Segmenting Chinese, Japanese, Thai, and hyphenated words
For Latin and other space-delimited scripts, the word tokenizer matches runs of letters, digits, and combining marks while keeping internal apostrophes (don't) and hyphens (long-term) together as one word. When a token contains characters from Han, Hiragana, Katakana, Thai, Lao, Khmer, or Myanmar scripts, it delegates to Intl.Segmenter with granularity: "word" and keeps isWordLike segments.
If your draft has mixed capitalization from multiple pasted sources, you can switch uppercase to lowercase or apply title case in a separate tab before checking final counts.
Sentence boundaries, abbreviations, and reading time calculator
Splitting sentences on every period breaks on Dr. Smith, U.S. policy, and e.g. this example. Likewise, guessing reading speed with an arbitrary round number gives unreliable presentation estimates.
Protecting abbreviations like Dr., e.g., and U.S. from over-counting
The sentence boundary detection skips abbreviations by splitting paragraphs on blank lines first and scanning punctuation marks (., !, ?, …, and CJK/Arabic/Devanagari terminators). When it sees a single period, it checks the preceding token against an abbreviation list (mr, mrs, dr, prof, e.g, i.e, u.s, u.k, fig, approx, and month names) plus single-letter initials.
If the token is an abbreviation or the next character does not start a new uppercase, numeric, or non-Latin sentence, the parser skips the break. To verify edits between two revisions of the same essay, open Text diff and compare lines side by side.
Calculating 238 WPM reading time and 140 WPM speaking time
Silent reading duration divides total word count by 238 words per minute, grounded in the Brysbaert 2019 reading rate meta-analysis (238 WPM) across 190 studies of adult non-fiction reading. Speaking time divides total words by 140 words per minute to reflect a clear, unhurried presentation pace.
| Metric in Counts panel | Underlying rule in text-tools.ts |
Edge-case handling |
|---|---|---|
| Words | Unicode letter/digit runs + Intl.Segmenter for spaceless scripts |
Keeps don't and high-level as 1 word |
| Characters | Intl.Segmenter (granularity: "grapheme") |
Counts combined emoji and accents as 1 character |
| Without spaces | Grapheme clusters excluding ^\s+$ |
Drops spaces, tabs, and newlines accurately |
| Sentences | Terminator scan with SENTENCE_ABBREV guard |
Ignores periods in Dr., e.g., and U.S. |
| Paragraphs | Non-empty blocks split on \n\s*\n |
Ignores trailing blank lines |
| Reading time | words / 238 words per minute |
Displays Under a minute below 1 min |
| Speaking time | words / 140 words per minute |
Rounds to min or hr min |
Word limits, most used words, and clean plain-text workflows
Essays, grant applications, and meta descriptions enforce strict caps, while SEO drafts benefit from spotting over-repeated terms. Two built-in helpers in the sidebar surface both signals as you edit.
Tracking words left or over the limit in real time
Enter any positive integer in Word limit to see a live status line directly beneath the input. While you remain under budget, it shows how many words are left; once you exceed the cap, the message turns red and reports how many words over the limit your draft sits.
When writing in Markdown, heading hashes (##), link URLs, and emphasis markers can inflate word or character totals slightly. You can strip Markdown syntax before checking final word counts so your numbers reflect published prose only.
How stop-word filtering builds the top 10 keyword list
Under the MDN Intl.Segmenter JavaScript reference, tokenized words are normalized to lowercase before frequency counting. The Most used words section drops common English stop words (the, and, for, with, and similar function words), pure digits, and short tokens under 3 characters (or under 2 characters in spaceless scripts).
It then sorts the remaining terms by frequency (and alphabetically on ties) and displays the top 10 words with their exact counts. That makes it easy to spot repetitive phrasing during final proofreading.
Keeping drafts private with opt-in browser storage
Every count runs synchronously inside your browser tab with zero network requests, and nothing is saved anywhere by default. If you are editing a long essay and want protection against an accidental refresh, persistence is strictly opt-in.
Ticking Keep my text in this browser writes your current text to the MDN Window localStorage API documentation under the key handy:word-counter. Because localStorage lives strictly inside your browser’s local origin on your device, no server ever receives a copy of your draft.
Unticking Keep my text in this browser removes the stored entry immediately, and clicking Clear empties the editor without leaving any cached text behind. You can also click Copy text at any moment to move your verified draft to the clipboard.
Tip: Once your word count and phrasing are locked, you can typeset finished plain-text drafts into printable PDFs locally in your browser without formatting glitches.