How I Built a Free Word Counter for the Browser
Every writer has hit a word limit — the 500-word essay, the 300-word abstract, the application box that cuts you off mid-sentence. I built a free word counter that answers the only question that matters in those moments — “how many words is this?” — live, in your browser, with no upload and no sign-up. It counts words, characters, sentences and paragraphs on every keystroke, and nothing you type ever leaves your device. Here is how it works, and the small decisions that make the numbers trustworthy.
Try the free Word Counter
Use ToolsOfWeb's Word Counter to count words, characters, sentences and paragraphs live in your browser — free, no sign-up, and your words are never uploaded to a server.
Why build a word counter in the browser at all?
Because the text you count is often unpublished work — a thesis chapter, a job application, a manuscript — and a server-side counter asks you to upload it to a stranger's computer first. A browser counter never sends your words anywhere, so there is nothing to leak, and it stays instant with no queue or account.
It is also fast on a flaky connection, because once the page has loaded there is no round trip at all. That privacy-first pattern is the same one behind the rest of ToolsOfWeb. The favicon generator draws your logo on canvases locally, the image tools process files on your own device, and the word counter is no different: the counting happens in your browser's JavaScript engine, on hardware you control. A draft you have not published yet deserves that treatment more than most files, because it is the one thing on your computer that does not exist anywhere else yet.
How do you count words correctly?
A word is whatever sits between two stretches of whitespace. The counter trims the text, splits it on runs of whitespace — spaces, tabs and newlines — and ignores the empty entries left behind. “Hello world” with three spaces counts as two words, not four, and an empty box counts as zero, not one.
In code, the whole rule is one line: trim the text, split on whitespace, and drop the empty pieces. Numbers standing on their own count as words, so a year like 2026 or a price like $49.99 is one token each, just like any other word. Hyphenated words count as one, because the hyphen is not whitespace, and so do contractions like “don't”. That convention agrees with Google Docs and Microsoft Word in the vast majority of cases, which is the point: a counter is only useful if its number matches the number the person checking your work will see.
What about characters, sentences and paragraphs?
Characters are the simplest count: the full length of the text, spaces and punctuation included. Characters without spaces strips every whitespace character first. Sentences split on runs of periods, exclamation marks and question marks, and paragraphs split on blank lines, with empty blocks ignored — all five numbers recomputed on every keystroke.
The “without spaces” number is the one to reach for when a limit says “characters” but clearly means content rather than padding. The sentence count is the one to treat as a guide rather than gospel. It is a heuristic, and abbreviations like “Dr.” or “e.g.” can inflate it slightly, because the counter cannot tell a sentence-ending period from an abbreviation's period without a dictionary. Paragraphs are more reliable: a block of text is one paragraph however many lines it wraps to on screen, and only a blank line starts a new one. Used together, the two counts tell you about structure — a 400-word piece with six sentences means marathon sentences that need breaking up, while forty paragraphs means fragmentation that needs merging.
Why do different word counters disagree?
Because “word” has no single agreed definition, and every tool picks its own edge cases. This counter splits on whitespace, so “well-known” is one word and “$49.99” is one token. Other tools split on anything that is not a letter, so the same text gives two words for “well-known” and three for “$49.99” — neither is wrong.
They simply follow different conventions, which is why two honest counters can disagree by a few words on the same text. The practical answer is a two-minute calibration habit. If you regularly submit to the same portal — a university system, a grant application, a publishing platform — paste a known sample once, compare their count with this one, and note the difference. Most portals document their counting method somewhere in their help pages. After that single check, you will know whether to aim five words under the limit or fifteen — and you will never lose a submission to an off-by-a-few count again. The golden rule either way: aim comfortably inside the limit, never exactly on it.
How fast does a word counter need to be?
Fast enough that you never notice it. Counting is a handful of string operations — split, filter, measure a length — so even a 100,000-word draft is counted in well under a millisecond. The tool recomputes all five numbers on every keystroke, and only the five number tiles re-render.
Under the hood it is React's useMemo: the counts are derived from the text, not stored separately, so they can never drift out of sync with what you typed. There is no debounce, no loading spinner and no server call to wait for. That simplicity is deliberate. A word counter does not need a database, an API or a queue; it needs a textarea and five small functions. Keeping it that small is also what keeps it free to run: there is no server cost per paste, no rate limit to hit, and no reason to ask you to sign up. The only state is the text itself, which lives in the page and disappears when you close the tab.
How long will my text take someone to read?
Divide the word count by 238. That is the average adult silent reading speed for English non-fiction — 238 words per minute — from Marc Brysbaert's 2019 meta-analysis of 190 reading studies, published in the Journal of Memory and Language. Fiction runs a little faster at 260 words per minute, and reading aloud drops to 183.
A 1,000-word article takes about four minutes to read; a 180-word cover letter takes under a minute. That is why the count matters beyond hitting limits. Word count is also a reading-time estimate, and reading time sets expectations: a recruiter skimming a cover letter, a reader deciding whether to open a long article, a teacher marking a stack of essays. When the counter shows 180 words across four paragraphs, you know at a glance that the piece is short, scannable and respectful of the reader's time — which is usually the impression you want to make.
FAQs
No. The counter runs entirely in your browser’s JavaScript engine. Not a single word is uploaded, logged or stored, so a thesis chapter, a manuscript or a confidential memo stays between you and your device. Close the tab and the text is gone, because the page holds no copy of it.
Different tools follow different conventions for edge cases — hyphenated words, numbers and contractions are the usual culprits. This counter splits on whitespace, which agrees with Google Docs and Word in the vast majority of cases. If a portal shows a number a few words off, that is normal: aim comfortably inside the limit rather than exactly on it.
Yes. Words are counted by splitting on whitespace, so a number standing on its own — a year, a price, a statistic — counts as one word, just like any other token. A number glued to a word, like "500-word", stays part of that word and adds nothing extra.
Paragraphs are blocks of text separated by blank lines. A single block with no blank line inside it counts as one paragraph, however many lines it wraps to on screen — wrapping is display, not structure. Press Enter twice between blocks and the count follows.
No. Paste as much text as you like; the counting is a handful of string operations, so even very long drafts stay instant. If your limit is a platform one instead — X at 280 characters, SMS at 160 — the Character Counter adds live progress bars against each platform.
Try the free Word Counter
Open the Word Counter and paste your draft — words, characters, sentences and paragraphs update live, free, with no sign-up and nothing uploaded. If the text came from somewhere messy, the Text Cleaner tidies extra spaces and line breaks first, and the Character Counter adds live progress bars against platform limits like X and SMS. The companion word counter guide walks through each metric and the editing routine that uses them.
