Understand this tool
Count what readers see and systems store
- What the concept means
- Character count can mean user-perceived grapheme clusters, Unicode code points, code units, or encoded bytes.
- Why it exists
- Count user-perceived characters, text without whitespace, letters, lines, and UTF-8 storage bytes locally.
- When to use it
- Checking a draft against a practical limit while understanding that platforms may use different counting rules.
- What the result means—and does not mean
- The main count uses Unicode grapheme clusters where supported, so one visible symbol may contain several code points and bytes.
Why one visible symbol is not one number
Unicode represents an accented letter either as a precomposed code point or as a base letter followed by a combining mark. Grapheme-cluster segmentation treats both displays as one user-perceived character when supported.
Emoji sequences can join people, skin tones, flags, or family members with several code points. UTF-8 then encodes those code points as variable-length bytes. Visually identical strings can therefore have different code-point and byte counts under different normalization forms.
Worked example
ASCII, emoji, a line break, and a combining mark
The sample contains “A🙂”, a line break, and an e followed by a combining acute accent.
- Example input
- A🙂, then a newline, then e plus a combining acute accent; limit 10.
- A and 🙂 each form one visible character.
- The line break is one grapheme in the page’s main count and starts a second line.
- The e and combining accent display as one grapheme.
- UTF-8 uses 1 byte for A, 4 for 🙂, 1 for the newline, and 3 for the combined e sequence.
Example result: 4 visible characters, 9 UTF-8 bytes, 2 lines, and 6 characters remaining under a limit of 10.
Visible length and encoded byte size answer different questions, so their totals do not need to match.
Key concepts
Key concepts
- Visible character
- A user-perceived text element counted as one grapheme cluster.
- Grapheme cluster
- One displayed unit that may combine several Unicode code points.
- Unicode code point
- A numbered value in the Unicode standard; several can form one visible character.
- UTF-8 byte
- A storage or transmission unit; a Unicode character can require one to four or more bytes as part of a sequence.
- Whitespace
- Spaces, tabs, and line breaks removed from the without-whitespace count.
- Character limit
- A comparison target set on this page; it does not override a destination platform’s own rules.
Method or process
How the process works
Why one visible symbol is not one number
Unicode represents an accented letter either as a precomposed code point or as a base letter followed by a combining mark. Grapheme-cluster segmentation treats both displays as one user-perceived character when supported.
Emoji sequences can join people, skin tones, flags, or family members with several code points. UTF-8 then encodes those code points as variable-length bytes. Visually identical strings can therefore have different code-point and byte counts under different normalization forms.
Compare the concepts
Three ways to describe text length
| Unit | What it counts | Why it differs |
|---|---|---|
| Visible character | Grapheme clusters | Combining sequences can display as one |
| Code point | Unicode scalar values | One grapheme may contain several |
| UTF-8 byte | Encoded storage units | Non-ASCII values usually need multiple bytes |
Common mistakes
Common mistakes
- Assuming every visible symbol uses one byte.
- Assuming every platform applies the same character rule.
- Assuming a combined emoji must count as several visible characters.
Edge cases and limits
Edge cases and limits
- Combining accents can use multiple code points for one grapheme.
- Family and flag emoji are often multi-code-point sequences.
- Line endings and normalization forms can change byte totals.
- Some platforms apply special rules to links or reserved text.