Counting text sounds like it should have one right answer. It does not. Two tools can look at the same paragraph and disagree about how many words and characters it contains, and both can be correct — because “word” and “character” are less precise than they appear.
What counts as a word
Almost every counter splits on whitespace, which handles ordinary prose well and then meets the edge cases.
Is mother-in-law one word or three? Is don’t one or two? What about a URL, an email address, or a number like 1,250,000? Split on whitespace and each is one word. Split on punctuation and the answers change completely.
The convention most tools follow — whitespace-separated runs of characters — is the same one word processors use, which is why a word counter should agree with Word or Docs on normal prose and may diverge on text full of hyphens, code or addresses.
For anything with a limit attached, the useful move is to check against the counter that will actually judge you. A university that says 2,000 words means whatever its own system counts.
Characters are stranger than words
A character count can mean at least three different things, and the difference is not academic.
Take the emoji 👨👩👧. A person sees one character. It is three people joined by invisible connectors — five Unicode code points. JavaScript’s .length, which a great many counters are built on, reports eight, because it counts UTF-16 units and each of those emoji needs two. Encoded as UTF-8 it occupies 18 bytes. One symbol, four defensible answers, and a counter can legitimately hand you any of them.
Accented letters do the same thing more quietly. é can be a single code point, or e followed by a combining accent — two code points that display identically. Copy text between applications and it can silently switch forms, changing your character count without changing a visible thing.
This is why a character counter matters most where a hard limit exists — a meta description, an SMS, a database column. And when a specific character is behaving oddly, looking up its code point is usually how you find out it was never the character you thought.
The invisible characters that break things
Text pasted from a web page or a PDF often carries passengers. Non-breaking spaces look exactly like ordinary spaces and are a different character, so a search for two words separated by one will not match. Zero-width characters have no appearance at all yet still count and still break comparisons.
And smart quotes — the curly ones a word processor substitutes automatically — are different characters from the straight ones code expects. Pasting a snippet from a document into a terminal and getting a syntax error is nearly always this.
Line endings, the invisible incompatibility
A line ending is a character too, and there are two conventions. Windows ends lines with a carriage return and a newline; everything else uses just a newline. So the same file can differ by one byte per line depending on where it was written.
This is why a file can look identical in two editors and still show as entirely changed in a diff. It is also why removing line breaks matters when text has been copied out of a PDF: the wrapping is baked in as real line endings, so the paragraph arrives broken into fragments that will not reflow.
The cleaning jobs that come up constantly
A few operations account for most day-to-day text work, and each is fiddly enough by hand to be worth a tool.
Comparing two versions. A text diff shows what actually changed between two blocks, which is far more reliable than reading both and trusting your eyes — particularly for the single-character changes that are easiest to miss.
Removing repeats. Deduplicating lines cleans up a list built from several sources. Watch for trailing spaces: two lines that look identical but differ by one invisible space are two different lines to any tool.
Changing case. Case conversion covers upper, lower, title and the programming conventions. Title case is the one with real disagreement — style guides differ on which small words stay lowercase, so the result is a convention rather than a rule.
Getting plain text out of markup. Stripping HTML tags gets the readable content out of a page source or an email, which is the usual first step before counting anything at all.
A short checklist for a count you can trust
Strip any markup first, so tags are not counted as content. Decide whether the limit means characters or bytes, since they differ the moment anything is not plain English. Check for invisible passengers if a count looks wrong by a few. And where a specific system enforces the limit, trust its counter over any other — including this one.