characters, shown as the last row of the limits table

Counts

0Characters
0Without spaces
0Words
0Lines
0UTF-8 bytes
0UTF-16 code units
0Unicode code points

Limits

Search engines cut titles and descriptions by pixel width, so 60 and 160 characters are guidelines. The X count approximates X's weighting: links starting with http:// or https:// count as 23, and emoji and characters such as Chinese or Japanese count as 2.

SMS

GSM-7Encoding
0Length in encoding units
0Message parts
160Left in current part

How the Character Counter works

Text on a computer can be measured in several ways, and they give different numbers for the same text. The counter shows all of them as you type. Characters are what you see on screen: an emoji built from several parts, such as a family or a flag, or a letter followed by a combining accent counts as one. Modern browsers do this with Intl.Segmenter; older browsers use a close approximation.

UTF-8 bytes is the storage size of the text in UTF-8, the encoding used by most web pages, files and databases: English letters take 1 byte, accented letters 2, most other scripts 3 and emoji 4. UTF-16 code units is what JavaScript's string.length, C# string.Length and many database column limits count, where an emoji counts as 2.

For SMS, the counter checks whether every character is in the GSM-7 alphabet. If so, one message holds 160 characters; the characters ^ { } [ ] ~ \ | and need an escape code and count as two. Any other character, such as an emoji or a curly quote, switches the whole message to UCS-2, which holds 70 units. Longer messages are split into parts of 153 (GSM-7) or 67 (UCS-2) because each part carries a small header, and a character is never split between parts.

How to use the Character Counter

  1. Type or paste your text into the text box, open a text file, or select Load example.
  2. Read the counts: characters, characters without spaces, words, lines, UTF-8 bytes, UTF-16 code units and Unicode code points. They update as you type.
  3. Check the Limits table to see how much room is left for a page title, a meta description, an X post and your custom limit. Enter a number in Custom limit to set your own.
  4. Look at the SMS section to see whether the message uses GSM-7 or UCS-2 encoding, how many parts it will be sent in and how many characters are left in the current part.

Example

The input Café 🚀 ready (with a rocket emoji) gives:

  • 12 characters, 10 without spaces, 2 words, 1 line
  • 16 UTF-8 bytes, 13 UTF-16 code units (the emoji uses 2) and 12 code points
  • an X weighted length of 13, because the emoji counts as 2
  • SMS encoding UCS-2, because the emoji is not in the GSM-7 alphabet (é is): 13 units, 1 part, 57 left in the part

Common use cases

  • Writing page titles and meta descriptions that are not cut off in search results.
  • Checking how many SMS parts a marketing or notification message will be billed as.
  • Making sure a value fits a database column or API field that limits length in bytes or UTF-16 units.
  • Keeping posts for X and other social networks within their character limits.

Frequently asked questions

Why do characters, code points and UTF-16 units give different numbers?

They measure different things. Characters are what you see: a flag emoji is one character. Unicode code points are the numbered symbols it is built from: a flag is two. UTF-16 code units are what JavaScript's length, C#'s string.Length and many databases count, where emoji outside the basic range take two units each. The counter shows all three so you can match the rule of the system you are writing for.

How are SMS parts calculated?

If every character is in the GSM-7 alphabet, one SMS holds 160 characters, and the characters ^ { } [ ] ~ \ | and € count as two. A single character outside GSM-7, such as an emoji, most curly quotes or many accented letters, switches the message to UCS-2, which holds 70 units. Longer messages are sent in parts of 153 (GSM-7) or 67 (UCS-2) units, and a character is never split across two parts.

How accurate is the X post count?

It follows X's published weighting: links starting with http:// or https:// count as 23 characters, emoji count as 2, characters such as Chinese, Japanese and Korean count as 2, and most Latin, Greek, Cyrillic, Hebrew and Arabic characters count as 1. Links written without http://, such as example.com, are counted as normal text here, while X may shorten them too, so treat the result as a close estimate.

Are 60 and 160 characters hard limits for titles and descriptions?

No. Search engines truncate titles and descriptions by pixel width, which depends on the letters used, so 60 and 160 characters are common guidelines rather than exact limits.

What counts as a UTF-8 byte?

UTF-8 stores English letters, digits and basic punctuation in 1 byte, accented Latin letters, Greek, Cyrillic, Hebrew and Arabic in 2 bytes, most other scripts including Chinese in 3 bytes, and emoji in 4 bytes. This is the size of the text in a UTF-8 file or database column.

Is my text uploaded anywhere?

No. The counting runs in your browser and your text is not sent to our server.