Character Counter
Paste or type your text below, total character count, character count excluding spaces, and a full breakdown update instantly as you type.
About the Character Counter
Every row in the table below comes from its own regular expression, letters, digits, punctuation and whitespace are each tallied separately while typing, alongside running totals with and without spaces. That breakdown makes it easy to hit an exact limit for a tweet, a meta description, an SMS, or a form field that caps input length.
- Letters, matched with
/[a-zA-Z]/. - Digits, matched with
/[0-9]/. - Punctuation, any character that isn't a word character or whitespace, matched with
/[^\w\s]/. - Whitespace, spaces, tabs and line breaks, matched with
/\s/.
"Letters" here means ASCII letters specifically
The letters count is deliberately narrow, it matches only the 26 unqualified English letters in each case, a through z. An accented letter like é, a non-Latin character like Cyrillic б, or a Chinese character doesn't match that pattern, and since it's also not a digit or whitespace, it falls through to the punctuation count instead. That's a real and worth-knowing limitation for text that isn't plain English, a French or Vietnamese sentence full of accented vowels will show a surprisingly high "punctuation" count and a surprisingly low "letters" count, not because anything is actually broken, but because the letters category was defined narrowly around basic ASCII.
Total character count uses UTF-16 code units, not visible characters
The total count reflects JavaScript's native string length, which counts UTF-16 code units rather than what a person would call a single visible character. Most emoji are represented as a surrogate pair, two UTF-16 units, so a single emoji adds 2 to the total count instead of 1. The category breakdown below it, by contrast, loops over the text by code point rather than by UTF-16 unit, so that same emoji counts as a single item there, landing in the punctuation bucket since it's neither a letter, digit, nor whitespace. That's why the four category counts won't always add up to exactly the total shown above them for text containing emoji, the total and the breakdown are genuinely counting by two different units, both technically correct, just not directly comparable for anything outside the basic ASCII range.
Different platforms don't count characters the same way
A count that hits exactly 280 here doesn't necessarily match what X/Twitter's own counter would show, platforms sometimes weight certain characters differently, a URL might count as a fixed length regardless of its actual character count, or non-Latin scripts might be weighted at a different rate than Latin ones under a given platform's specific counting rules. This tool provides an honest, straightforward character count, useful as a general gauge, but the platform's own live counter is the authoritative source when a limit genuinely needs to be hit exactly.
SMS limits work on an entirely different counting system
A traditional SMS message caps out at 160 characters, but only if every character fits the older GSM 7-bit alphabet, plain Latin letters, digits, and a limited set of common punctuation. The moment a message includes a single character outside that set, an emoji, certain accented letters, or various symbols, the entire message switches to Unicode (UCS-2) encoding, which drops the per-message limit all the way down to 70 characters, not a partial reduction, a full switch to a stricter limit for the whole message. This is why a text that looks like it should easily fit in one SMS segment sometimes gets flagged as needing two or three, one unexpected character early in the message can retroactively shrink the effective limit for everything that follows it.
Reading the breakdown as a sanity check, not just a limit gauge
Beyond hitting an exact character limit, the category breakdown is useful for a quick sanity check on pasted data, a field that's supposed to be a phone number showing an unexpectedly high letter or punctuation count is worth a second look before that data gets submitted somewhere expecting a clean numeric value. Spotting that kind of mismatch from the breakdown table is often faster than scanning the raw pasted text by eye, especially for a long string where a single stray character is easy to miss.
Frequently Asked Questions
Why does an accented letter like é show up under Punctuation instead of Letters?
The letters category only matches the 26 unaccented ASCII letters, a-z. Since é isn't in that range and also isn't a digit or whitespace, it falls into the punctuation count instead. This affects any text with accented letters or non-Latin scripts, it's a category-definition limitation, not a bug.
Why might my emoji count as 2 characters in the total but only 1 in the breakdown?
The total count uses JavaScript's native string length, which counts UTF-16 code units, and most emoji are represented as a pair of two units. The category breakdown below it counts by code point instead, treating that same emoji as a single item. Both are technically correct, they're just counting by different units, which is why the breakdown doesn't always sum to exactly the total for text containing emoji.
Will this count match exactly what Twitter/X or another platform shows?
Not necessarily. Different platforms sometimes count characters using their own rules, weighting URLs or non-Latin scripts differently. This tool gives a straightforward, honest character count, useful as a general gauge, but the platform's own counter is authoritative when a limit needs to be hit exactly.
Does this tool send my text anywhere?
No. All counting happens locally in the browser as JavaScript processes the text typed or pasted in. Nothing is uploaded or stored.
Why does my text message get flagged as needing multiple SMS segments?
A single SMS holds 160 characters using the older GSM 7-bit alphabet, but including even one character outside that set, certain emoji, accented letters, or symbols, switches the whole message to Unicode encoding, dropping the per-message limit to 70 characters. One unexpected character early in a message can shrink the effective limit for everything after it.
Can the breakdown help catch bad data in a field that should be numbers only?
Yes. A field expected to hold a clean phone number or similar numeric value showing an unexpectedly high letter or punctuation count is a quick signal something's off, often faster to spot from the breakdown table than by scanning the raw pasted text for a stray character.