Why Character Count Matters
A character counter counts every letter, digit, space, punctuation mark and line break you type: "Hello, world!" is 13 characters, or 12 without the space. This tool counts what you see, so an emoji with a skin tone counts once, and it also shows words, lines, UTF-8 bytes and how your text measures against X, SMS and SEO limits. Your text stays in your browser.
Character limits exist everywhere in digital writing. Twitter and X allow 280 characters per post. SMS text messages are 160 characters per segment. Meta descriptions should be under 160 characters for optimal SEO display. Instagram captions support up to 2,200 characters. LinkedIn posts cap at 3,000. Knowing your character count in real time prevents truncation and keeps your message within platform limits.
For developers and programmers, character counting is essential when working with database fields, API payloads, and string validation. VARCHAR fields in SQL have strict character limits. Password fields often enforce minimum and maximum lengths. This tool counts both with and without spaces, which matters for different use cases.
How This Counter Counts Characters
Computers store text as code points and bytes, but people count what they see. The counter follows the Unicode rules for user-perceived characters (grapheme clusters), so a letter with an accent or a composed emoji counts as one, even when it is built from several code points. Spaces, tabs and line breaks all count as characters. "No Spaces" removes every kind of whitespace, including line breaks.
| Text | Characters here | JavaScript length | Code points | UTF-8 bytes | X weighted |
|---|---|---|---|---|---|
| café (one é) | 4 | 4 | 4 | 5 | 4 |
| café (e + combining accent) | 4 | 5 | 5 | 6 | 4 |
| 👍 thumbs up | 1 | 2 | 1 | 4 | 2 |
| 👍🏽 with skin tone | 1 | 4 | 2 | 8 | 2 |
| 👨👩👧👦 family | 1 | 11 | 7 | 25 | 2 |
| 🇺🇸 US flag | 1 | 4 | 2 | 8 | 2 |
| ❤️ red heart | 1 | 2 | 2 | 6 | 2 |
| 日本 (Japanese) | 2 | 2 | 2 | 6 | 4 |
"JavaScript length" is what text.length returns, the number of UTF-16 code units. It is the number many web forms and older counters use, which is why a single emoji can eat two or more characters of a form limit. The UTF-16 figure in the byte row above is that number times 2.
Lines, words and the rest
- Lines is the number of line breaks plus one, and 0 for an empty box. A wrapped long line is still one line.
- Words are runs of characters between spaces, tabs or line breaks, so "well-being" and "don't" are one word each. Chinese and Japanese text without spaces counts as one word per run.
- Sentences are counted from . ! and ? marks, so abbreviations like "Dr." add one. Any text without end punctuation counts as 1 sentence.
- Paragraphs are blocks separated by a blank line.
Platform Limits and How Each One Counts
A limit is only useful if you count the way the platform does. The bars above use the method in the second column.
| Where | Limit | How it is counted |
|---|---|---|
| X (Twitter) post | 280 | Weighted: most Latin text 1, CJK characters and each emoji 2, every link 23. Premium accounts can post longer text. |
| SMS, GSM-7 | 160 (153 per part) | Plain Latin letters, digits and common symbols. ^ { } [ ] ~ | \ and € take 2 each. |
| SMS, UCS-2 | 70 (67 per part) | Used as soon as one character is outside GSM-7, such as an emoji or a curly quote. Counts UTF-16 units. |
| Instagram caption | 2,200 | Characters; up to 5 hashtags per post since December 2025. |
| LinkedIn post | 3,000 | Characters. |
| YouTube title | 100 | Characters; descriptions allow 5,000. |
| Page title (SEO) | About 50 to 60 | Guidance only. Google cuts titles by pixel width (roughly 600 px on desktop), not by a character count. |
| Meta description | About 150 to 160 | Guidance only. Google has no fixed limit and trims snippets to fit the screen; phones show less. |
| Email subject | 78 per line | RFC 5322 recommends 78 characters per header line. What people actually see depends on the mail app. |
The X count here follows the published rules of X's open-source counting library. Links written without http:// or https:// are counted as normal text here, while X may still shorten them to 23, so treat a result within a few characters of 280 as a close call.
SMS Segments: Why One Emoji Triples the Cost
A message longer than one SMS is split into parts, and each part loses a few characters to a header that lets the phone stitch them back together. Carriers and SMS APIs usually bill per part.
| Parts | GSM-7 characters | UCS-2 characters |
|---|---|---|
| 1 | up to 160 | up to 70 |
| 2 | 161 to 306 | 71 to 134 |
| 3 | 307 to 459 | 135 to 201 |
| 4 | 460 to 612 | 202 to 268 |
Worked example. A 159-character reminder in plain English fits in one GSM-7 part. Add a single 👍 and the whole message switches to UCS-2. The emoji takes 2 UTF-16 units, so the text is now 161 units, and 161 divided by 67 per part rounds up to 3 parts. Replacing curly quotes (‘ ’ “ ”) with straight ones often has the same effect in reverse.
Common Counting Mistakes
- Trusting text.length for limits. If your form or database checks characters, decide whether it means code units, code points or visible characters, and test with an emoji.
- Confusing characters with bytes. MySQL VARCHAR(255) holds 255 characters, but with the utf8mb4 character set each one can take up to 4 bytes. The older utf8 (utf8mb3) set cannot store emoji at all.
- Forgetting line breaks. Each line break is a character. A file saved with Windows line endings uses two bytes (CR LF) per break, while a browser text box stores one.
- Copying invisible characters. Text pasted from documents can carry non-breaking spaces or zero-width spaces. A zero-width space counts as a character but is not whitespace, so two words joined by one count as a single word.
Character Counter Guide
Primary Keyword: Brand Name. Avoid keyword stuffing: Google may rewrite overly optimized titles. Keep it descriptive and compelling. A well-written 50-character title outperforms a keyword-stuffed 60-character one. Google says it shows the page's own title element about 87% of the time and writes its own title link for the rest, usually when a title is missing, stale or stuffed with keywords.