Key Takeaways
State the limit in explicit units and test a fixed input. A👩💻é, without a trailing newline, contains eight UTF-16 units, six code points, three graphemes and 15 UTF-8 bytes. KitNelo reports code points and UTF-8 bytes; its text analyzer does not report graphemes.
- Graphemes, code points, UTF-16 units and UTF-8 bytes can give four different counts.Read the supporting section: Identify the limit before choosing a count
- The fixed input should produce six code points and 15 UTF-8 bytes; exclude accidental newlines.Read the supporting section: Audit one original with no trailing newline
- NFC can change counts and bytes. Preserve originals and avoid silently normalizing identifiers or evidence.Read the supporting section: The same-looking accent may have different bytes
In this article
Identify the limit before choosing a count
MDN’s segmentation reference distinguishes grapheme, word and sentence segmentation. A grapheme generally approximates a user-perceived character; a code point represents a different layer. JavaScript string length counts UTF-16 units.
For example, 😀 has one code point, two UTF-16 units and four UTF-8 bytes. 👩💻 contains woman, zero-width joiner and laptop code points, usually displayed as one grapheme in a supporting environment. A different font does not automatically change the input bytes.
Audit one original with no trailing newline
Download the fixed UTF-8 text (in this page’s exercise ZIP), read its contents and paste them into the text analyzer. Expect Characters (code points) 6 and UTF-8 bytes 15. Exclude filenames, surrounding quotes and the escape notation in the code below.
The sequence contains A, 👩💻, e and combining accent U+0301. The last two code points form one grapheme. This original teaching fixture was recalculated through the current processing function; it does not establish any social platform’s counting policy.
| Part | UTF-16 units / code points | Graphemes | UTF-8 bytes |
|---|---|---|---|
| A | 1 / 1 | 1 | 1 |
| 👩💻 | 5 / 3 | 1 | 11 |
| e + U+0301 | 2 / 2 | 1 | 3 |
| Total | 8 / 6 | 3 | 15 |
const text = "A👩💻é";
text.length; // 8
[...text].length; // 6
[...new Intl.Segmenter("en", {granularity:"grapheme"}).segment(text)].length; // 3
new TextEncoder().encode(text).length; // 15The same-looking accent may have different bytes
String.normalize documentation explains Unicode normalization. NFC on a copy combines this e and accent into é. The complete string then has seven UTF-16 units, five code points, three graphemes and 14 UTF-8 bytes. Similar appearance does not imply identical original bytes or hashes.
Normalize a copy when the receiver explicitly requires it and record the rule. Do not alter order identifiers, passwords, signed material or evidence merely to reduce a count. Compatibility normalization NFKC can make other substitutions and is not interchangeable with this NFC example.
Verify against the actual receiving system
KitNelo’s count does not determine another system’s limit. If a field merely says “10 characters,” consult its documentation or use a non-sensitive control to identify the rejection condition. Record the submitted value, stated unit and error. Six code points do not guarantee acceptance under a ten-byte limit.
For encoding failures, continue with the URL and Base64 checks. For an encoded image upload, use the Base64 size budget. Deleting an accent or emoji would conceal the counting mismatch.
Further reading & sources
Put the guide into practice
Open the relevant tool, preview the result and check your exported file.


