text / PRACTICAL GUIDE

Character Count Explained

Understand why emoji, whitespace, and Unicode can make two counters disagree.

A character count can mean visible symbols, Unicode code points, UTF-16 units, or bytes. These agree for simple English letters but can differ for emoji and accented text. Use the measurement required by your destination, and check whether it includes whitespace.

THE IDEA, VISUALLY

The same text, different counts

  1. Hello world
  2. 11 with the space
  3. 10 without the space
Different systems may count emoji and combined characters differently. Always check the destination's counter.

Visible characters are not storage units

The letter A is one visible character, one Unicode code point, one UTF-16 unit, and one UTF-8 byte. Many other symbols do not line up so neatly. An emoji can need two UTF-16 units, while a joined emoji sequence can contain several code points.

A grapheme cluster approximates what a reader sees as one character. Combining a letter with an accent can create one visible unit from multiple code points.

References: Unicode: user-perceived characters

Compare different measurements

The accent row describes an e followed by a combining acute accent, not the visible explanatory label. These examples contain no trailing newline. Visually identical accented letters can have different encodings.

Compare different measurements
Exact textGraphemesCode pointsUTF-16 unitsUTF-8 bytes
A1111
😀1124
é (U+00E9)1112
e + ◌́ (U+0065 U+0301)1223
A B3333

Whitespace still takes space

Spaces, tabs, and line breaks normally count unless a system explicitly excludes them. A pasted trailing line break can push a field over a strict limit. “Without whitespace” is a separate convenience metric, not a universal platform standard.

Windows line endings use two code points for a line break; web textareas commonly normalize them. Compare using the actual destination rather than relying on a copied file’s byte length.

Test the limiting system

For a form with a character cap, try the exact text there. Different systems may count links, emoji, and line breaks differently. Do not assume JavaScript string.length measures visible symbols.

The Edit All counter displays several measures together. Use the one documented by your destination and leave a margin when its rules are unclear.

Frequently asked questions

Does “without spaces” remove newlines too?

In Edit All, the metric excludes whitespace, including spaces, tabs, and line breaks. A destination that excludes only ordinary spaces can report a different total.

Does an emoji always count as one character?

Not under every measurement. A grapheme-aware count may treat a joined emoji as one visible unit, while its code-point, UTF-16, and byte counts are larger.

Have a correction or a question? Get in touch. We revise guides when a clearer explanation or a correction is needed.