Counting characters: SMS, X, YouTube titles and emoji
“How many characters is this?” has more than one answer, because each system counts something different: what you see, the code points behind it, or the bytes it takes to send. A waving hand 👋 is one character on screen and two for JavaScript; an SMS with one accented letter holds 70 characters instead of 160. This guide explains the rules the counts come from.
What a “character” is
What you see as one character, a grapheme, can be several Unicode code points, and each code point one or two UTF-16 code units. JavaScript’s length counts code units, so 👋 has a length of 2. The family emoji 👨👩👧 is one grapheme made of five code points (man, joiner, woman, joiner, girl) and eight code units. Even “café” can be four code points or five, with the accent stored separately; most systems normalise it to four.
A good counter counts graphemes, what a reader sees. Spreading a string into code points or using Intl.Segmenter, as MDN describes, gets there; length alone does not.
SMS: 160, 70, 153 and 67
An SMS carries at most 140 bytes of text. With the GSM alphabet, 7 bits per character, that is 160 characters; as soon as one character is outside it, the whole message switches to UCS-2, 2 bytes per character, and holds 70. A few GSM characters take two places because they need an escape: € [ ] { } ^ ~ \ |.
Longer texts are sent in parts, and each part spends 6 bytes on a header that tells the phone how to join them, which leaves 153 GSM characters or 67 UCS-2 characters per part.
| Message | Fits in one SMS | Per part when split |
|---|---|---|
| Only GSM characters | 160 | 153 |
| At least one other character (an emoji, ó, ã, ê) | 70 | 67 |
So 161 GSM characters need 2 parts and 307 need 3; with an emoji, 71 characters already need 2. The French and Spanish accents are the usual trap: à, è, é, ì, ò and ù are in the GSM alphabet, but á, ó, ú, â, ê, ô, ã and õ are not, so “canción” or “não” switches the message to 70.
Limits on X, YouTube and in Google
| Where | Limit | How it counts |
|---|---|---|
| Post on X | 280 | Latin, Greek, Cyrillic, Arabic and most other alphabets 1; Chinese, Japanese and Korean 2; every emoji 2, even a family; every link 23 |
| YouTube video title | 100 | Characters |
| YouTube description | 5,000 | Characters |
| Meta description for Google | No limit | Google cuts the snippet to fit the screen and often writes its own from the page |
On X a post of plain Latin text can use all 280 characters, but one in Japanese only 140, and a link always costs 23 however long it is.
Why two counters give different numbers
- One counts graphemes, the other UTF-16 code units: every emoji and some rarer letters differ.
- Spaces and line breaks: some tools leave them out, and a Windows line break is two characters.
- Normalisation: an accent stored as a separate mark adds a code point until the text is normalised.
- Platform rules: X weighs characters and links, SMS counts bytes, a title field counts characters.
Frequently asked questions
Why did my SMS drop to 70 characters?
Because one character in it is not in the GSM alphabet: an emoji, a curly quote or an accent such as ó or ã. The whole message is then sent in UCS-2, which fits 70 characters, or 67 per part.
Why does € count as two in an SMS?
It is in the GSM extension table, which is reached with an escape character, so it takes two of the 160 places. The same goes for [ ] { } ^ ~ \ and |.
Do spaces count?
In an SMS, a post on X and a YouTube title, yes: a space is a character like any other. The character counter shows the count with and without them.
How long should a meta description be?
Google sets no limit and cuts the snippet to fit the screen, and it often writes its own from the page. Put the important words first, so they survive the cut.
Why does JavaScript say 2 for one emoji?
Because length counts UTF-16 code units, and most emoji take two. Count graphemes instead, for example with Intl.Segmenter, and 👋 is 1.
References
- 3GPP TS 23.040 — Technical realization of the Short Message Service (SMS)
- 3GPP TS 23.038 — Alphabets and language-specific information
- X Developer Platform — Counting characters
- YouTube Help — Edit video settings
- Google Search Central — Control your snippets in search results
- MDN Web Docs — String: length
Related guides
- IP addresses explained: IPv4, IPv6 and the reserved ranges
- Subnets and CIDR explained: prefixes, masks and usable hosts
- DNS records explained: A, AAAA, CNAME, MX, TXT and NS
- Is a website down, or is it just you? How to check, step by step
- HTTP status codes and Cloudflare errors: what 403, 404, 429, 500, 503 and 521 mean
- Unix timestamps and time zones explained
- Counting dates: days between dates, leap years and ISO weeks
- Time zones and daylight saving time: meetings across cities
- Image formats explained: JPEG, PNG, WebP, AVIF and HEIC
- Image size explained: pixels, DPI, file size and quality
- Phone photos explained: HEIC, EXIF metadata and your privacy
- Password strength explained: length, entropy and passphrases
- Hash functions explained: SHA-256, checksums and password hashing
- JSON Web Tokens explained: claims, signatures and safe validation
- API keys explained: length, format, storage and rotation
- UUIDs explained: v4, v7 and choosing the right version
- QR codes explained: capacity, error correction and print size
- Percentages and VAT explained: adding, removing and stacking
- Common JSON errors and how to fix them
- CSV files explained: delimiters, quotes, encoding and Excel
- Text encodings explained: UTF-8, Base64 and URL encoding
- Regular expressions explained: classes, quantifiers and groups
- MB or MiB, Mbps or MB/s: file sizes and speeds explained
- Cron expressions explained: fields, steps and time zones
- UTM parameters explained: tagging links that analytics can read
- Break-even, margin and ROAS explained: the numbers behind a small business
- Freelance rates explained: hourly rate, day rate and billable hours
- YouTube RPM and CPM explained: what a creator actually earns
- Colour contrast explained: WCAG ratios, readable text and colour formats
- Editing PDFs in the browser: what merging, splitting and converting keep