Calculator ToolBox

Word & Character Counter

Paste or type text to count words, characters, letters, sentences and paragraphs — and see how many bytes it takes in UTF-8, UTF-16 and UTF-32. Handles emoji, accents and languages written without spaces.

Your text stays in this browser — nothing is uploaded.

Words
0
Characters
0

As displayed on screen

Characters (no spaces)
0
Letters
0
Sentences
0
Paragraphs
0
Lines
0
Digits
0

Unicode breakdown

Code points
0

Unicode scalar values

UTF-16 code units
0

What JavaScript string length returns

Reading time
0 min

At 200 words per minute

Encoded size

UTF-8
0 bytes

1–4 bytes per character

UTF-16
0 bytes

2 or 4 bytes per character

UTF-32
0 bytes

Always 4 bytes per character

About this tool

Why character counts disagree

Ask three programs how many characters a text has and you can get three answers, because "character" has three meanings. A grapheme cluster is what you see on screen. A code point is one Unicode value. A UTF-16 code unit is the 16-bit slot JavaScript stores text in — and it is what string.length reports in a browser. For plain English all three agree, which is why nobody notices until it matters.

The family emoji is one visible character, five code points and eight UTF-16 code units. Vietnamese shows the same split without emoji: typed with combining accents, "Phố" is three visible characters but five code points. This tool reports all three and treats the visible count as the headline number, because that is the one a person counting would give. The practical upshot: a field that allows "280 characters" is usually counting UTF-16 code units, so a few emoji cost far more of the budget than they look like they should.

How words are counted

Splitting on spaces only works for languages that use them. "我喜欢下象棋" has no spaces and four words; a space-splitting counter calls it one. This tool applies the Unicode word-break rules instead, so Chinese, Japanese and Thai segment correctly.

Two consequences worth knowing. Numbers count as words, so "I have 3 cats" is four. Hyphenated compounds split, so "state-of-the-art" is four — that is the Unicode rule, though some word processors group it as one. If you need to match a particular word processor exactly, expect small differences around hyphens and abbreviations.

Picking an encoding for file size

UTF-8 is variable width: one byte for ASCII, two for most European and Middle-Eastern letters, three for the rest of the Basic Multilingual Plane including Chinese, Japanese and Korean, and four for emoji and rare characters. It is the right default for the web and by far the smallest of the three for English text.

UTF-16 uses two bytes for everything in the Basic Multilingual Plane and four above it, so it can beat UTF-8 on dense CJK text and is roughly double the size for ASCII. UTF-32 spends four bytes on every character without exception. The counts here exclude any byte-order mark — a UTF-8 BOM adds 3 bytes and a UTF-16 BOM adds 2, which matters when a size limit is tight.

Bytes per character by script

How many bytes one character takes

Source: The Unicode Standard, encoding forms
ExampleScript or typeUTF-8UTF-16UTF-32
AASCII letter or digit124
éLatin with accent, Greek, Cyrillic, Hebrew, Arabic224
ốLatin Extended Additional, Thai, Devanagari324
象Chinese, Japanese, Korean324
👋Emoji and rare CJK (above the BMP)444

A character built from several code points — an emoji with a skin tone, or a letter with a combining accent — costs the sum of its parts in every encoding.