β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
| Text | Graphemes | UTF-16 code units | UTF-8 bytes |
|---|---|---|---|
| cafe | 4 | 4 | 4 |
| cafΓ© | 4 | 4 | 5 |
| cafΓ© (e + combining accent) | 4 | 5 | 6 |
| π | 1 | 2 | 4 |
| ππ½ | 1 | 4 | 8 |
| π¨βπ©βπ§ | 1 | 8 | 18 |
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.