Skip to content
Server-sideDeleted in 30 minutes

Character Counter

Counts characters the way the platform you are pasting into will count them, and shows how much room is left against the limits people actually run into — an X post, a meta description, an SEO title, a single SMS segment. Emoji and accented letters are handled correctly, which is where most counters quietly give the wrong number.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free
Your text
0
Characters
0
No spaces
0
Lines
0
UTF-16 units
UCS-2
SMS type
X / Twitter post280 left
SEO title60 left
Meta description158 left
Instagram caption2200 left
SMS (1 segment)160 left

What it does

  • Grapheme-accurate counting for emoji and accents
  • Live remaining-length against six common platform limits
  • Automatic GSM-7 versus UCS-2 SMS segment detection
  • Separate code point and UTF-16 unit totals for developers

How to use Character Counter

  1. 1

    Paste your text

    Drop in the post, description, or message you are checking. Counting begins immediately; there is no button to press.

  2. 2

    Read the headline number

    "Characters" is what a reader sees and what platform limits mean. Use this one unless you are working against a database column.

  3. 3

    Check the limit list

    Each row shows how many characters you have left, or how far over you are. The SMS row changes its own limit depending on what you typed.

  4. 4

    Trim and watch it update

    Edit directly in the box. Every count and every remaining figure recalculates on each keystroke.

How it works

The three totals come from three different ways of walking the same string.

UTF-16 units is String.length. It counts the storage units JavaScript uses internally. Characters outside the Basic Multilingual Plane — which includes every emoji — occupy two units each, called a surrogate pair.

Code points iterates the string with a spread, which is surrogate-aware and yields one entry per Unicode scalar value. An emoji is one code point; a sequence joined by zero-width joiners is several.

Characters uses Intl.Segmenter with grapheme granularity — this site's own server-side implementation of the Unicode text-segmentation algorithm. This is the only method that agrees with a human counting by eye. It correctly treats a flag, a skin-toned thumbs-up, a family emoji, and a letter with a separately encoded accent as one character each. Where Intl.Segmenter is unavailable the tool falls back to code points and says the figure is approximate rather than reporting a number it cannot stand behind.

The SMS row runs a separate check. Every character is tested against the GSM-7 basic and extension alphabets; a single failure switches the displayed limit from 160 to 70, because that is what the carrier will do.

When you'd use this

The common case is a hard ceiling that rejects your text after you have written it: a meta description that gets truncated in search results, an SEO title cut off mid-word, a post the compose box will not accept.

The more valuable case is the one you would not otherwise catch. A marketing SMS that quietly costs double because a copywriter's curly apostrophe pushed it into UCS-2. A product name with an accented letter that overflows a database column sized in bytes. A user bio truncated by an API at a UTF-16 boundary, leaving a broken half-emoji at the end.

Those failures share a shape: the text looks fine, the naive character count looks fine, and something downstream disagrees. Seeing all the counts together is what makes the disagreement visible before it ships.

A note on accuracy

No character counter can be right for every destination, because destinations genuinely disagree. X weights its limit by script. Some databases count bytes, not characters, so a UTF-8 emoji costs four. Some CMS fields count what the browser reports and others count what the server receives after normalization.

What this tool does is show you the underlying numbers rather than pick one and hide the rest, so that when a limit behaves unexpectedly you can see which count the other system is using.

Examples

An emoji makes three counts disagree

Family 👨‍👩‍👧‍👦
Characters: 8 No spaces: 7 Code points: 14 UTF-16 units: 18 Lines: 1

The family emoji is four people joined by three invisible zero-width joiners. A reader sees one character, Unicode sees seven code points, and JavaScript's string length sees eighteen. All three numbers are correct answers to different questions, which is why this tool shows all of them.

One dash turns one SMS into two

Reminder: your appointment is tomorrow at 10am – please arrive ten minutes early and bring your ID.
Characters: 99 No spaces: 83 SMS (1 segment) (UCS-2 — non-GSM-7 character): 29 over / 70

At 99 characters this looks comfortably inside the familiar 160-character SMS limit. It is not. The en dash is outside the GSM-7 alphabet, so the whole message is re-encoded as UCS-2 and the single-segment limit drops to 70 — meaning this send costs two messages instead of one. Replacing the dash with a hyphen fixes it.

Frequently asked questions

Why do some counters give a different number for the same text?

Because they are counting different things. Most report JavaScript's string length, which measures UTF-16 code units rather than characters. For ordinary Latin text the two are identical, so the difference never shows up. Add a single emoji and the naive count jumps by two, or by eleven for a multi-person emoji, while the number of characters a reader sees went up by one.

Which number should I use for a social media post?

The headline "Characters" figure. Platforms that publish a character limit mean what a person perceives, and count a whole emoji as one unit toward it. One caveat worth knowing: X weights its 280 limit, counting most non-Latin scripts and emoji as two rather than one, so a post in Japanese or heavy with emoji will hit the ceiling sooner than the raw count here suggests.

What is the GSM-7 warning about?

SMS has two encodings. GSM-7 covers a restricted alphabet and fits 160 characters in one message segment. If your text contains even one character outside that alphabet, the entire message switches to UCS-2 and a single segment holds only 70 characters. The usual culprits are curly quotes, em and en dashes, and emoji — often pasted in without anyone noticing, then billed as two messages.

Does it count spaces and line breaks?

Yes. Spaces, tabs, and line breaks are characters and every platform counts them against your limit. The "No spaces" figure strips all whitespace and is there for typography and design work, where the count that matters is visible glyphs rather than what the field will accept.

What are code points and UTF-16 units for?

They are for developers. If you are sizing a database column, validating against an API limit, or debugging why a string truncated badly, the relevant number is almost always UTF-16 units, because that is what most length checks in JavaScript, Java, and older APIs enforce. Truncating by UTF-16 index is also how emoji get sliced in half into replacement characters.