08 / Text / word-counter
Word Counter
Count words, characters, lines, sentences and paragraphs live.
How to use
- 01Type or paste your text into the Text box.
- 02Read the live counts: Characters, Characters (no spaces), Words, Lines, Sentences, Paragraphs, Reading time and Bytes (UTF-8).
- 03Edit the text and watch the counts update as you go, for example to fit a length limit.
- 04Press Copy to copy the text, or Clear to start again.
What is this tool?
The word counter measures text as you type, reporting words, characters with and without spaces, lines, sentences, paragraphs, an estimated reading time and the size in UTF-8 bytes. The byte count makes it useful for developers checking database column and payload limits, not only for writers. Your text stays in your browser and is never uploaded.
How words and characters are counted
A word is any run of characters separated by whitespace, so hyphenated terms like "browser-based" and tokens like "v2.1" count as one word each. Characters counts the full length of the text, including spaces and line breaks; Characters (no spaces) excludes all whitespace, including tabs and newlines.
Lines are counted by line breaks, so an empty text has 0 lines and a single line with no break has 1. Paragraphs are blocks of text separated by one or more blank lines. Sentences are runs of text ending in a period, exclamation mark or question mark (or the end of the text), so abbreviations like "e.g." and decimals like 3.14 are counted as sentence breaks.
For example, "Hello world. Café!" has 3 words, 18 characters, 16 characters without spaces, 2 sentences and 19 UTF-8 bytes.
Characters vs bytes: why UTF-8 size matters
Many systems limit length in bytes rather than characters. In UTF-8, ASCII letters use 1 byte, accented letters such as é use 2, most CJK characters use 3 and emoji use 4. A 255-character field can therefore overflow a 255-byte column if the text contains non-ASCII characters.
The Characters figure follows JavaScript string length, which counts UTF-16 code units, so an emoji such as 🚀 counts as 2 characters and 4 bytes. That matches how a JavaScript maxlength check or .length assertion will measure the same text.
How reading time is estimated
Reading time divides the word count by 230 words per minute, a common average for adult silent reading, and rounds to the nearest minute. Any text with at least one word shows a minimum of 1 minute.
Common use cases
- Checking that UI copy, error messages or push notifications fit their length limits
- Verifying byte length before inserting text into a size-limited database column or API field
- Building boundary-value test strings of an exact length
- Keeping meta descriptions, commit messages or ticket summaries within guidelines
- Estimating reading time for documentation and release notes
FAQ
How do I count words in my text?
Paste the text into the Text box. The word count and every other statistic update instantly.
Does the character count include spaces?
Characters includes spaces and line breaks. Characters (no spaces) excludes all whitespace.
Are hyphenated words counted as one word?
Yes. Words are split only on whitespace, so "well-known" counts as one word.
Why is the byte count higher than the character count?
Bytes are measured in UTF-8, where non-ASCII characters take 2 to 4 bytes each. Plain ASCII text has equal character and byte counts.
Why does an emoji count as two characters?
The character count uses JavaScript string length, which counts UTF-16 code units, and most emoji are stored as two units.
How is reading time calculated?
It divides the word count by 230 words per minute and rounds to the nearest minute, with a minimum of 1 minute for any text.