Text statistics
Get information about a text, the number of characters, the number of words, its size in bytes, ...
About Text statistics
Counts the characters, words and lines of a text and shows its size in bytes when encoded as UTF-8, updating as you type.
When you would use it
- Checking a text against a length limit: a tweet, a meta description, a form field or a database column.
- Estimating the storage or payload size of a piece of content.
- Counting the words of an essay, an abstract or an answer with a word limit.
How to use it
- Paste or type the text.
- Read the four counters above the field.
- Edit the text and watch the numbers follow.
Things worth knowing
- Character count is the number of UTF-16 code units, which is what JavaScript's length reports. Most emoji and some rare characters count as 2, so the number can differ from what a platform shows.
- Byte size is the UTF-8 length: ASCII letters take 1 byte, most European accented letters 2, Chinese, Japanese and Korean characters 3, and emoji usually 4. A limit expressed in bytes (database columns, some APIs) therefore differs from a limit in characters.
- Words are counted by splitting on whitespace, which works for languages that separate words with spaces. Chinese and Japanese text without spaces counts as one word per line.
- Line count follows line breaks, so a long paragraph that wraps on screen is still one line.
Frequently asked questions
- Why does my emoji count as two characters?
- Emoji outside the Basic Multilingual Plane are stored as two UTF-16 code units. Some platforms count them as one, others as two; this tool follows JavaScript, which counts two.
- Why is the byte size larger than the character count?
- Any character outside plain ASCII takes more than one byte in UTF-8. Text with accents, CJK characters or emoji is therefore larger in bytes than in characters.