Reference

Unicode, character encoding and hidden character counting

Two tools can count the same text and disagree. This explains why, and which count you should trust for which job.

β€œCharacter” has at least three meanings in software: a byte, a UTF-16 code unit, and a user-perceived character (a grapheme cluster). Tools that pick different definitions produce different totals for identical text.

The same text, three counts

TextGraphemesUTF-16 code unitsUTF-8 bytes
cafe444
cafΓ©445
cafΓ© (e + combining accent)456
πŸ™‚124
πŸ‘πŸ½148
πŸ‘¨β€πŸ‘©β€πŸ‘§1818

WordToolbox counts grapheme clusters β€” what a reader sees as one character. That is the right count for word limits and caption planning. Platforms enforcing a byte or code-unit budget may still count an emoji as two or more, so leave a margin near a hard limit.

Invisible characters that inflate counts

  • Zero-width space (U+200B) and zero-width joiner (U+200D) β€” often pasted in from web pages and design tools.
  • Non-breaking space (U+00A0) β€” copied from word processors and HTML; counts as a space character.
  • Soft hyphen (U+00AD) β€” invisible until a line breaks.
  • Byte order mark (U+FEFF) β€” sometimes leads a file pasted from an editor.
  • Carriage return (U+000D) β€” Windows line endings add one per line.

If a count looks a few characters higher than expected, invisible characters are the usual cause. Paste through a plain-text step, or retype the affected line.

How words are matched

WordToolbox matches words as runs of Unicode letters and numbers, joined across apostrophes and hyphens. Accented Latin, Cyrillic, Greek, Arabic and Hebrew all count correctly. Scripts written without spaces, such as Chinese and Japanese, do not have word boundaries a regular expression can find β€” for those, use the character count.

Need to count your own text?

Words, characters, sentences, paragraphs and reading time β€” live, in your browser, free.

Try the free word counter

Related pages