Skip to content
gohacks.dev
Tooling

Word and Character Counter

Count words, characters, UTF-8 bytes, UTF-16 code units, lines, sentences and paragraphs, with an estimated reading time.

Free · No sign-up · Your inputs stay in your browser

Input

Count words, characters and bytes

Output

22 words

Characters

122

Without spaces

100

UTF-8 bytes

122

UTF-16 units (.length)

122

Lines

3

Sentences

3

Paragraphs

2

Reading time

1 min

At 238 words a minute.

Characters are counted as a reader sees them (grapheme clusters), so an emoji with a skin tone is one. JavaScript's .length counts UTF-16 code units, and a VARCHAR limit in MySQL utf8mb4 counts code points, which is why the three numbers can differ.

Runs in this browser. Nothing you paste is sent to a server.

Why the character counts disagree

A character is not one thing. An emoji with a skin tone is one grapheme, two code points and four UTF-16 code units, and takes eight bytes in UTF-8. JavaScript's .length counts UTF-16 code units; PHP's strlen() counts bytes and mb_strlen() code points; a MySQL VARCHAR(255) in utf8mb4 limits code points. When a form says a value is too long and it looks short, compare these.

Limits that use bytes

Some limits count bytes rather than characters: a single InnoDB index key, a 255-byte filename on most Linux file systems, the 4 KB that browsers allow per cookie. The UTF-8 byte count is the one to check against those.

Reading time

238 words a minute is the average silent reading rate for non-fiction found in Brysbaert's 2019 meta-analysis of 190 studies. Technical text with code reads slower.

Share

Frequently asked questions

Does it count words in Chinese or Japanese?
Words are counted as runs of letters and digits, which works for space-separated languages. Chinese and Japanese text is not separated by spaces, so use the character count for those.
Why does an emoji count as one character but several bytes?
Characters are counted as grapheme clusters, what a reader sees as one symbol. In UTF-8 an emoji takes four bytes, and modifiers or joiners add more.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools