Learn how to count characters in text and why it matters. Covers character vs byte counts, Unicode handling, social media limits, SEO character targets, and common platform restrictions.
Character counting sounds trivial until you discover that a "character" is more complex than it appears β especially in Unicode. Understanding the difference between characters, bytes, and code points is essential for developers working with text storage, social media managers hitting platform limits, and SEO writers optimizing title tags and meta descriptions.
In everyday use, a character is a single symbol β a letter, digit, space, or punctuation mark. But at the technical level:
In ASCII (English letters, digits, basic punctuation), 1 character = 1 byte. In UTF-8 encoding (the web standard), characters outside the basic ASCII set take more bytes:
| Character Type | Characters | Bytes (UTF-8) |
|---|---|---|
| ASCII letters (aβz, AβZ) | 1 | 1 |
| Latin accented (Γ©, Γ±, ΓΌ) | 1 | 2 |
| Chinese/Japanese/Korean | 1 | 3 |
| Emoji (π, π) | 1 | 4 |
This matters when you're counting characters for database field limits (which often restrict bytes, not characters), SMS messages (which use different encodings), or APIs that count bytes.
Emoji introduce additional counting complications. A family emoji π¨βπ©βπ§βπ¦ is displayed as one character but is actually a sequence of 7 Unicode code points joined by Zero Width Joiner (ZWJ) characters. In JavaScript, str.length counts UTF-16 code units β an emoji that needs 4 bytes in UTF-8 counts as 2 in JavaScript's length property. Twitter's character counter correctly handles this; many naive implementations don't.
| Platform / Field | Limit | Notes |
|---|---|---|
| X (Twitter) post | 280 | URLs count as 23 |
| Google title tag | 50β60 | Pixel-based; ~600px wide |
| Google meta description | 155β160 | Truncated with ellipsis beyond |
| SMS (ASCII) | 160 | GSM-7 encoding; one "part" |
| SMS (Unicode/emoji) | 70 | UCS-2 encoding per part |
| Instagram caption | 2,200 | First ~125 visible without tap |
| YouTube title | 100 | ~70 shown in search |
| Open Graph title | 60β90 | Varies by sharing platform |
Title tags: Google doesn't technically have a character limit β it has a pixel width limit of approximately 600 pixels for desktop. At average font size, this works out to roughly 50β60 characters. Longer titles get truncated with "..." in search results, potentially cutting off important keywords.
Meta descriptions: The visible limit in Google search is approximately 155β160 characters on desktop and 120 characters on mobile. Exceeding this gets truncated, but Google can rewrite your meta description entirely if it deems another passage from your page more relevant.
URL slugs: No hard limit, but keep slugs under 75 characters. Google's John Mueller has confirmed that very long URLs are harder to crawl and share.
Most web character counters count Unicode code points (what most people intuitively expect). For languages with complex character composition (Arabic with vowel marks, Korean with jamo clusters, Hindi with matras), the visible character count may differ from the code point count. For maximum cross-platform compatibility in user-facing limits, always test with the actual target language and platform.
Use our free Character Counter — results appear as you type. No sign-up needed!
🚀 Open Character Counter Free