Character Counter
Last updated: 27 June 2026
Reviewed by Gavin Meiring, Lead research and primary author ยท Doctoral Candidate (Corporate Governance) ยท Research and drafting assisted by AI
- Twitter's original 140-character limit was based on the SMS limit of 160 characters, minus 20 for a username. The limit was doubled to 280 in 2017.
- The most used characters in English text are, in order: space, e, t, a, o, i, n. 'Etaoin shrdlu' was a typesetter's phrase representing the 12 most common characters.
- ASCII originally encoded 128 characters. Unicode now supports over 149,000 characters across 161 scripts โ including emoji, ancient scripts, and mathematical symbols.
Character Counter
The character counter counts the exact number of characters in any text, with options to count with or without spaces, and breaks the text down into letters, numbers, punctuation, and whitespace. It is designed for social media managers, developers, SEO writers, and anyone working within character limits.
How to Use the Character Counter
- Paste or type your text into the input field.
- The character count updates instantly as you type.
- Read the total character count with spaces, the count without spaces, and the breakdown by character type.
- Compare your count against platform limits (Twitter/X: 280, SMS: 160, meta description: 155-160).
- Edit your text and watch the counter update in real time.
The Formula
Characters with spaces: Count every character in the string, including letters, digits, punctuation, spaces, and newlines. This equals the string length.
character_count = string.length
Characters without spaces: Remove all whitespace characters (spaces, tabs, newlines), then count the remaining characters.
characters_no_spaces = string.replace(/\s/g, '').length
Letters only: Count characters that are alphabetic (A-Z, a-z, and Unicode letter equivalents).
Digits only: Count characters that are numeric (0-9).
Punctuation: Count characters that are neither letters, digits, nor whitespace.
Real-World Example
You are writing a meta description for a web page and need to stay within 155-160 characters.
Your draft reads: "Discover our range of handmade leather wallets, crafted in the UK from full-grain leather. Free delivery on orders over ยฃ50. Shop the collection today."
Pasting this into the character counter shows 152 characters with spaces. This falls within the ideal range, so it will display fully in Google search results without truncation.
If the count had been 175 characters, you would edit to remove or shorten phrases. "Discover our range" might become "Browse our," saving 9 characters. "Shop the collection today" might become "Shop now," saving 17 characters.
Platform Character Limits Reference
Different platforms enforce different character limits:
- Twitter/X post: 280 characters
- SMS message: 160 characters (goes to 2 messages above this)
- Meta description (SEO): 155-160 characters recommended
- LinkedIn post: 3,000 characters
- Instagram caption: 2,200 characters
- Google Ads headline: 30 characters
- Google Ads description: 90 characters
- YouTube video title: 100 characters (70 recommended for search)
- Email subject line: 50-70 characters recommended for mobile
Frequently Asked Questions
What is the difference between a character and a byte? In ASCII text (English characters), one character equals one byte. In Unicode (which includes characters from all languages, emojis, and symbols), some characters use 2, 3, or even 4 bytes. Most platforms count by characters (code points), not bytes, but some older systems that impose byte limits may truncate Unicode text unexpectedly. Emojis typically count as 2 characters on Twitter.
Do emojis count as one character? This depends on the platform. In terms of Unicode, most common emojis are one code point and count as one character. However, some complex emojis (like family emoji sequences or skin-tone modifiers) are composed of multiple code points and may count as 2 or more characters on certain platforms. Twitter counts most emojis as 2 characters due to its encoding model.
Does a newline count as a character? Yes. A newline (line break) is a character. Depending on the operating system, it may be represented as one character (\n on Unix/Mac) or two characters (\r\n on Windows). Pasting text from a Word document may include extra characters from Windows-style line endings, which can increase your count slightly.
Why does my character count differ from the platform's counter? Platforms sometimes normalise whitespace, strip certain characters, or count Unicode differently from a simple string length. For critical character-limited content (such as paid ad copy), always verify your final count within the platform's own composer before publishing.
Also try these free tools related to Character Counter: - Word Counter
What the counter counts, and the four measures that differ
Text length is not a single number. Four different measures appear in practice, and a limit written for one of them gives the wrong answer when it is applied to another.
| Measure | What it counts | Where it turns up |
|---|---|---|
| Code points | Unicode scalar values, the closest thing to one character | most web forms, the count on this page |
| Grapheme clusters | user-perceived characters, after combining marks and zero-width joiners are merged | text editors, cursor movement, careful word processing |
| UTF-8 bytes | one to four bytes per code point | byte limits in databases, HTTP headers, older APIs |
| UTF-16 code units | one unit per code point below U+10000, two above it | the length of a JavaScript string, many platform APIs |
The four measures agree on plain English text and diverge as soon as anything outside the basic Latin range appears. The table below runs the same short strings through all four.
| Text | Code points | Grapheme clusters | UTF-8 bytes | UTF-16 code units |
|---|---|---|---|---|
| The letter A | 1 | 1 | 1 | 1 |
| รฉ as the single code point U+00E9 | 1 | 1 | 2 | 1 |
| e followed by combining acute, U+0065 U+0301 | 2 | 1 | 3 | 2 |
| The euro sign U+20AC | 1 | 1 | 3 | 1 |
| The grinning face U+1F600 | 1 | 1 | 4 | 2 |
| Three-person family sequence, U+1F468 U+200D U+1F469 U+200D U+1F467 | 5 | 1 | 18 | 8 |
Two rows carry the lesson. A letter with a combining accent is one character to a reader and two to a counter that works in code points, which is why normalising text to NFC before it is measured removes a class of phantom length. The family sequence is built from five code points held together by two zero-width joiners, so it is one picture to a reader, five characters to a naive counter, eight units of UTF-16 and eighteen bytes of UTF-8. A single emoji can therefore consume between one and ten slots depending on who is counting and how the sequence is composed.
Counting a mixed-script post against the limit on X
The length model X uses is published. The configuration file shipped with the company's own open-source counter, twitter-text, sets a maximum weighted length of 280 at a scale of 100, a default weight of 200 for any code point not covered by a listed range, and a weight of 100 for the ranges 0 to 4351, 8192 to 8205, 8208 to 8223 and 8242 to 8247. Latin, Greek, Cyrillic, Hebrew, Arabic and the common punctuation blocks sit inside those ranges and cost one character each. Everything else, including Chinese, Japanese, Korean, Thai, Devanagari and emoji, costs two.
The ceiling in raw units is 280 multiplied by 100, which is 28,000. That makes the arithmetic of a mixed post checkable on paper.
| Post contents | Weighted units | Characters charged | Fits in 280? |
|---|---|---|---|
| 280 Latin characters | 28,000 | 280 | Yes, exactly at the ceiling |
| 200 Latin characters plus 40 CJK characters | 28,000 | 280 | Yes, exactly at the ceiling |
| 200 Latin characters plus 41 CJK characters | 28,200 | 282 | No, over by 2 |
| 240 Latin characters plus one three-person family sequence, emoji parsing on | 24,000 plus 200 | 242 | Yes |
| The same 240 Latin characters plus that family sequence, emoji parsing off | 24,000 plus 3 x 200 plus 2 x 100 | 248 | Yes |
Read the first two rows together, because they are the whole point. A post of 280 Latin characters and a post of 240 visible characters made of Latin and CJK fill the limit to the same extent. The second post is 40 characters shorter and no closer to the ceiling. The fourth and fifth rows show the effect of the emoji parsing flag in the same configuration: with it enabled the whole joined sequence is charged as one code point at the default weight of 200, and with it disabled each participating code point is charged separately, so three emoji at 200 units plus two zero-width joiners at 100 units come to 800 units rather than 200. The joiner is inside the 8192 to 8205 range, which is why it is the cheaper of the two components.
Links are handled by a separate rule. The same configuration gives a transformed URL length of 23, so a twelve-character link and a ninety-character link both consume 23 units once the platform wraps them. Long query strings in a post cost nothing extra, and short ones cost no less.
When the platform disagrees with your editor
Two systems impose limits that a plain character count does not predict, and both are worth knowing before a campaign goes out.
SMS is the older case. A single message holds 160 characters in the 7-bit default alphabet defined in the 3GPP specification for the short message service, TS 23.038. One character from outside that alphabet moves the entire message to 16-bit encoding and cuts the capacity to 70 characters. The offending character is not the only one that pays: the whole message is re-encoded. A 158-character message is one billed segment in the 7-bit alphabet and three segments in the 16-bit one, because a message longer than a single segment is split and each part then carries a header that reduces its payload to 67 characters. That arithmetic is set out in TS 23.040.
X is the newer case, and the gap is smaller but real. The weighted model above means a post that an editor reports as 240 characters can be at 282 by the platform's own count. Verify the number in the composer that will publish it, and treat the third-party count as an estimate.
Assumptions behind the character counts
The count on this page follows the definitions already stated above it. The total with spaces is the length of the string, including every space, tab and line break. The count without spaces removes all whitespace before measuring. Letters, digits and punctuation are then classified, and punctuation is the remainder after letters, digits and whitespace are taken out, which is why a currency sign and a hyphen land in that class rather than in a class of their own.
Three assumptions sit behind those numbers.
- One code point is one character. A byte limit or a UTF-16 limit will give a different answer on the same text, and the difference appears only when the text leaves the basic Latin range.
- The text is measured as entered. No normalisation is applied, so a precomposed accented letter and the same letter written as a base plus a combining mark are counted differently even though they render identically. Normalising to NFC first makes the two agree.
- Whitespace means the characters that
\smatches in a regular expression, which covers the space, tab, line feed, carriage return, form feed, vertical tab and the Unicode space separators. A non-breaking space, common in text pasted from a web page, is whitespace and is removed by the no-spaces count.
A note on the counting standards
Three published documents sit behind the numbers on this page. Unicode Standard Annex #29, Unicode Text Segmentation, defines the grapheme cluster as a user-perceived character and gives the boundary rules that join a base letter to its combining mark and hold an emoji sequence together, which is the source of the distinction in the first table. The twitter-text configuration at version 2 supplies the weighted model used in the second section, with its maximum weighted length of 280, scale of 100, default weight of 200 and the four weight-100 code point ranges listed above. The 160 and 70 character figures for SMS come from the 3GPP short message service specifications, TS 23.038 for the default alphabet and TS 23.040 for concatenation.