Skip to content
LeedyBox
Support

How Words and Characters Are Counted

Paste the same text into two apps and you may get two different counts. Neither is necessarily wrong: they are counting different things. This guide explains the common units and why the numbers differ.

Four Ways to Count Characters

Computers store text as Unicode, and a "character" can be measured at several levels:

  • Grapheme clusters are what a reader sees as one character, such as "é", "한" or "👍🏽".
  • Code points are the individual Unicode values. One visible character can be made of several code points.
  • UTF-16 code units are what JavaScript's length and several other programming languages count. Characters outside the Basic Multilingual Plane, including most emoji, take two units.
  • UTF-8 bytes are what a file or database column stores. ASCII letters take one byte, accented Latin letters usually two, Korean, Chinese and Japanese characters usually three, and emoji four or more.
Text Graphemes Code points UTF-16 units UTF-8 bytes
a 1 1 1 1
é (single code point) 1 1 1 2
é (e + combining accent) 1 2 2 3
한 (Korean syllable) 1 1 1 3
👍 1 1 2 4
👍🏽 (with skin tone) 1 2 4 8
👨‍👩‍👧 (family emoji) 1 5 8 18

Combining Accents and Korean Text

Some characters can be stored in more than one way. "é" can be a single precomposed code point or a plain "e" followed by a combining accent. They look identical, but the second form has one more code point and one more byte. Text copied from some systems, such as file names on certain operating systems, may use the decomposed form.

Korean has the same issue. A syllable like "한" is usually stored as one code point, but it can also be written as separate jamo (ㅎ, ㅏ, ㄴ) that combine on screen. A counter based on graphemes shows 1 in both cases, while a code point count shows 1 or 3. Unicode normalisation (NFC or NFD) converts between the two forms.

Counting Words in Different Languages

In English, splitting on spaces gives a reasonable word count, although hyphenated words, contractions, numbers and URLs can still be counted differently by different tools.

Chinese, Japanese and Thai are usually written without spaces between words, so splitting on spaces would count a whole sentence as one word. Better counters use a word segmenter that relies on dictionaries and rules. The LeedyBox counter uses the browser's Intl.Segmenter, which identifies word boundaries for many languages. Segmentation in these languages is a matter of convention, so results can differ from other tools or from a human count. Some publishers in these languages count characters instead of words for that reason.

Why Apps and Websites Count Differently

A limit such as "maximum 280 characters" or "VARCHAR(255)" may be measured in graphemes, code points, UTF-16 units or bytes, depending on the system. Some services also count a link as a fixed length or treat certain scripts as heavier. When you need to fit a limit, find out which unit the target system uses and compare against that number. The LeedyBox counter shows graphemes, UTF-16 units and UTF-8 bytes side by side and includes a limit checker, so you can see how close you are in the relevant unit.

Lines, Paragraphs and Line Breaks

Line counts depend on how line breaks are stored. Windows typically uses two characters (CR LF), while Linux and macOS use one (LF). A tool that counts raw characters may count a Windows line break as two. A trailing line break at the end of the text may or may not count as an extra empty line. Paragraphs are usually counted as blocks separated by one or more blank lines, so a single line break inside a paragraph does not start a new one.

Reading Time Estimates

Reading time is calculated by dividing the word count by an assumed reading speed. Real speed varies with the reader, the language and how technical the text is, and the word count itself depends on segmentation. Treat the estimate as a rough guide for planning rather than a measurement.

Frequently Asked Questions

Why does one emoji count as 2 characters in some apps?

Those apps count UTF-16 code units. Most emoji are stored as two units, and emoji with skin tones or combined people use more.

Which count should I use for a database column limit?

Check the database documentation. Some limits are in characters and others in bytes, so the UTF-8 byte count is often the one to compare.

Does the counter send my text anywhere?

The LeedyBox Word & Character Counter runs in your browser, so the text you paste is counted on your device.