Character Counter: How Emoji, Links and Line Breaks Are Counted
A character counter gives one number, but emoji, links and line breaks can be counted in more than one way. Here is what ClearText Editor counts, what X counts, and where the two differ.
Short answer: The character count in ClearText Editor is the length of the text in UTF-16 units, the same count JavaScript uses. A plain letter is 1, a smiley is 2, a thumbs-up with a skin tone is 4, and a family emoji is 11. X uses a different system: every emoji is 2, every link is 23, and Chinese, Japanese and Korean characters are 2 each. For plain Latin text the two agree. For emoji, links and CJK text they do not.
What the Editor Counts
We typed 18 strings into the live editor on October 26, 2026 and compared its “Characters” figure with three other ways to count the same text: code points, visible symbols (grapheme clusters, from the browser’s Intl.Segmenter) and UTF-8 bytes. The editor’s figure matched the UTF-16 length every time, and the platform limit uses the same number.
| Text | Editor | Code points | Visible symbols |
|---|---|---|---|
| hello | 5 | 5 | 5 |
| é (one character) | 1 | 1 | 1 |
| e plus a combining accent | 2 | 2 | 1 |
| 😀 (smiley) | 2 | 1 | 1 |
| 👍🏽 (thumbs up, skin tone) | 4 | 2 | 1 |
| 🇷🇸 (flag) | 4 | 2 | 1 |
| 👨👩👧👦 (family) | 11 | 7 | 1 |
| 日本語 (Japanese) | 3 | 3 | 3 |
| 𝒜 (mathematical script A) | 2 | 1 | 1 |
So the family emoji, which looks like one symbol, adds 11. The same letter can also count as 1 or 2 depending on how it is stored: a precomposed é is 1, while an e followed by a separate accent mark is 2, although both look identical.
The Serbian sentence “Čućemo šta će đaci žaliti.” and its Cyrillic version both showed 26 characters. In UTF-8 they take 32 and 47 bytes, which matters only if a limit is set in bytes rather than characters.
Spaces, Tabs and Line Breaks
- A line break counts as 1. “a”, a new line and “b” show 3; three line breaks in a row show 5.
- Windows line endings count as 1 too. The text box drops the carriage return, so a Windows-style line break shows 3 for the same three characters.
- A tab counts as 1 and is removed from the “without spaces” figure.
- A non-breaking space counts as 1 and is also removed from the “without spaces” figure.
- A zero-width space counts as 1, but is not removed from the “without spaces” figure, and it does not split words: “a”, the invisible character and “b” count as one word. See zero-width characters and hidden text.
For the difference between the two figures, see characters with spaces vs without spaces.
How X Counts
X’s developer documentation says a post can contain up to 280 characters, counted with weights. Latin letters, punctuation and common symbols count as 1. Emoji and Chinese, Japanese and Korean characters count as 2. “All emojis count as 2 characters, regardless of complexity,” and any link is shortened and counted as 23 characters, whatever its real length. The source is the X documentation on counting characters. The page does not say how line breaks are counted, so we do not claim anything about them.
| Text | Editor | X, per its documentation |
|---|---|---|
| 😀 (smiley) | 2 | 2 |
| 👍🏽 (thumbs up, skin tone) | 4 | 2 |
| 🇷🇸 (flag) | 4 | 2 |
| Family emoji | 11 | 2 |
| 日本語 (Japanese) | 3 | 6 |
| A 67-character link | 67 | 23 |
The X column is calculated from the rules in its documentation, not measured on the platform.
What This Means for a 280 Limit
With the Twitter / X preset selected, 140 smileys fill the bar exactly: 280 out of 280, which matches X’s own weighting of 2 per emoji. But 100 family emoji show 1,100 out of 280 in the editor, while by X’s rules they would take 200. A post with a long link will also look longer in the editor than it is on X. In both cases the editor errs on the safe side.
CJK text goes the other way. The editor shows 280 Japanese characters as 280 out of 280, and by X’s documented rules the same text would be 560. For CJK posts, the editor’s bar does not tell you whether the post fits on X.
The Limit Selector
The presets are Twitter / X (280, the default), FB Visible (400), Instagram (2,200), LinkedIn (3,000), YouTube (5,000), Facebook Full (63,206) and Custom. A few details from our tests:
- The counter shows the count, not what is left. It reads “279 / 280”, not “1 left”.
- The bar rounds. At 279 of 280 and at 2,199 of 2,200 it already shows 100%. It turns red only at one character over the limit.
- Nothing is blocked. Typing or pasting 300 characters at the 280 limit gives “300 / 280” and a red bar. The text is not cut.
- Custom takes whole numbers from 1 upwards, up to 9,007,199,254,740,991. It rejects 0, negative numbers, decimals, 1e3, 007, an empty field and letters by marking the field invalid and keeping the last valid limit. Spaces around a number are ignored.
- The choice is remembered. After a reload the same preset or custom value is back, saved in your browser.
For how the other figures in the editor are counted, see word count vs character count.
The editor’s character count is exact for what it measures, the length of the text in UTF-16 units, and for plain text it matches what a platform counts. For emoji, links and CJK text, check the platform’s own rules, because the same text can be a different length there.
Related posts
For questions or inquiries contact us at info@cleartexteditor.com