Word and character counter

Count words, characters, sentences, lines and paragraphs, with an emoji counted as one character

The tool loads here. It needs JavaScript, because the work happens on your device.

Your files and your privacy

Your text never leaves the page. Counting is a function running in this browser tab, with no server involved and no request made as you type. Nothing is saved or restored: reloading the page or selecting Clear data discards everything, which is what makes the tool usable on a shared computer.

What this tool does

Live counts for a block of text: characters, characters without spaces, words, sentences, lines and paragraphs. Characters are counted the way a person counts them, so an emoji built from several code points counts as one.

It reports six numbers for whatever is in the box, updated on every keystroke: characters, characters excluding whitespace, words, sentences, lines and paragraphs. The value is in how each is defined, because counters disagree and a number without a definition is not much use. A word is a run of characters between whitespace. A character is a grapheme cluster, so an emoji assembled from several code points counts as one, and so does a letter written with a separate combining accent. Sentences end at punctuation, lines at any line break, paragraphs at a blank line.

How to use it

  1. Paste or type into the text box. The six counts under it update as you type; there is no button to press.
  2. Read the counts against the definitions below, because the number you need depends on which rule the system enforcing your limit uses.
  3. Select Clear data when you are finished, which empties the box and the undo history together.

Example use cases

Supported input and output

Accepts

Produces

What this tool will not do

Common mistakes

Technical notes

Characters are counted with Intl.Segmenter at grapheme granularity, so a sequence a reader sees as one character counts as one; where Segmenter is unavailable it falls back to code points. The count without spaces removes every Unicode whitespace character first, then counts graphemes again. Words are the number of whitespace-separated runs in the trimmed text. Sentences are counted by matching runs of non-terminator characters followed by any run of terminators, so repeated punctuation counts once. Lines split on CRLF, LF or a lone CR, and paragraphs are blocks separated by a blank line.

Frequently asked questions

Does an emoji count as one character?
Yes. Characters are counted as grapheme clusters — the technical name for what a person would call one character — so an emoji assembled from several code points and a joiner counts as one rather than five.
What exactly counts as a word?
A run of characters with whitespace on both sides, after leading and trailing whitespace has been removed. Punctuation does not split a word, so ‘end,start’ with no space is one word.
How are sentences detected?
By punctuation: text followed by one or more of . ! ? or the full-width CJK forms. Consecutive marks count once, so ‘Really??’ is one sentence, and text with no terminating punctuation counts as one.