Skip to content

Word & Character Counter

Count words, characters, sentences, and more.

Everything is counted in your browser. Nothing is uploaded.

Words

31
Characters
186
Characters (no spaces)
155
Sentences
3
Lines
3
Paragraphs
2

Counts update as you type. Your text stays on this device and is never sent anywhere.

How the word counter works

The counter reads your text and produces eight independent measurements. Words are runs of non-whitespace characters (the pattern \S+), so the count does not depend on how many spaces, tabs, or line breaks sit between words. This is more reliable than splitting on a single space, which over-counts when spacing is uneven.

Characters are reported three ways because “one character” is ambiguous with emoji and accents. Characters is the UTF-16 code-unit length (what string.length returns). Code points is the Unicode scalar count. Graphemes is the user-perceived symbol count, computed with Intl.Segmenter, which groups a base symbol and its modifiers (like an emoji plus its variation selector) into one. Characters without spaces is the character count with every whitespace unit removed. Sentences counts each [.!?]+ group, lines splits on every line break (CRLF, CR, or LF), and paragraphs counts non-empty blocks separated by blank lines. An empty box gives zero for everything.

Worked example

Take this text, where marks a line break and the blank line is a real empty line:

I love café ❤️.␊␊Do you?

Measure How it is counted Result
Words I, love, café, ❤️., Do, you? 6
Characters UTF-16 code units (heart is 2 units) 24
Code points Unicode scalars (heart is 2 points) 24
Graphemes Symbols you see (heart counts as 1) 23
Characters, no spaces 24 minus 6 whitespace units 18
Sentences the . and the ? 2
Lines split on the two line breaks 3
Paragraphs two non-empty blocks around the blank line 2

Notice the heart symbol: it is stored as two code units and two code points but renders as one grapheme, which is why characters (24) and graphemes (23) differ by one. The accent in “café” is a single code point here, so it does not split the counts.

How to use it

  • Type or paste your text into the box. Counts update live, with no button to press.
  • Check graphemes, not characters, when you care about visible length, for example sizing a headline or a social post with emoji.
  • Use characters without spaces for limits that ignore spacing, such as some academic or form-field caps.
  • Read sentences and paragraphs as structure cues for readability, then skim for over-long blocks.
  • Trust the word count over messy spacing. Cleaning up double spaces will not change it.

Limitations

The counts are mechanical, not editorial. Sentence detection keys on punctuation, so abbreviations, decimals, and ellipses inflate it, and a sentence without terminal punctuation is not counted. Word counting treats any non-whitespace run as a word, so URLs, hyphenated compounds, and numbers each count as one. Grapheme counts depend on the browser’s Unicode support and can vary slightly across devices for rare symbols. These are accurate measurements of the text itself, not a judgment of grammar, style, or meaning.

Frequently asked questions

Why does the character count differ from what my keyboard shows?

The counter reports three character views. **Characters** is the raw UTF-16 length your program stores. **Code points** is the Unicode scalar count. **Graphemes** is the number of symbols you actually see. A single emoji like a colored heart can be two code units and two code points but one grapheme, so the three numbers can disagree on the same text.

How does it count words with extra spaces or line breaks?

Words are runs of non-whitespace, so any amount of spacing between them counts as one separator. Double spaces, tabs, and newlines do not inflate the word count. Pasting a paragraph with messy spacing gives the same word count as the clean version.

Is my text sent anywhere?

No. Counting happens entirely in your browser as you type. Nothing is uploaded, logged, or stored on a server, which makes it safe for drafts, private notes, and confidential copy.

How are sentences detected?

A sentence is counted at each run of `.`, `!`, or `?`. A run like `?!` or `...` counts as one terminator, not several. Abbreviations such as 'Dr.' or 'e.g.' will each add to the count, so treat the sentence number as an approximation for prose with many periods.

What is the difference between lines and paragraphs?

**Lines** counts every line break, including single ones inside a block. **Paragraphs** counts blocks separated by one or more blank lines and ignores empty blocks. A list with single line breaks is many lines but one paragraph.