Skip to content

Count characters

With spaces and without, plus the byte count your database and your SMS gateway are actually measuring. Emoji count as one character here, because that is what they are.

  • Never stored
  • No queue, no waiting
  • No signup, no watermark

0

Characters

what a person sees

0

Without spaces

whitespace excluded

0

Words

any language

0

UTF-8 bytes

what a database counts

Every count, and what uses it
LinesAs an editor numbers them
0
SentencesNot broken by “Dr.” or “etc.”
0
ParagraphsBlocks separated by a blank line
0
Code pointsWhat a regular expression “.” matches
0
UTF-16 unitsWhat string.length reports in JavaScript
0
UTF-8 bytesWhat a VARCHAR limit and HTTP headers measure
0
Reading timeSilently, at 238 words a minute
—
Speaking timeAloud, at 150 words a minute
—
Longest wordBy characters, not bytes
—
Average wordA rough readability signal
—

Start typing and everything fills in. Try an emoji, or a sentence of Chinese — both are counted the way a person would count them, which most counters get wrong.

How it works

1

Paste or type

The count updates as you go. Nothing is stored.

2

Pick the count you need

Characters, characters without spaces, code points or UTF-8 bytes — each is shown, with what uses it.

3

Watch your limit

SEO titles, meta descriptions, SMS segments and a 255-byte field are all tracked against what you have written.

Four numbers, because "character" has four meanings

Take the emoji of a family, or a thumbs-up with a skin tone. A person sees one character. It is built from several code points joined by invisible connectors, so a regular expression sees seven. JavaScript stores text in 16-bit units and anything outside the basic range takes two of them, so it reports eleven. Encoded as UTF-8 for a database column it occupies twenty-five bytes. None of these numbers is wrong and none is the answer — the right one depends entirely on what is doing the limiting.

So the practical question is who imposed the limit. A database column declared as VARCHAR counts bytes in most engines, which is why a field that accepts 255 English characters rejects far fewer Japanese ones. An SMS is 160 characters in its own seven-bit alphabet, and drops to 70 per message the moment one character falls outside it — a single curly quote or emoji can turn one message into three. A form validator in JavaScript almost always counts UTF-16 units, which is why a field that says 280 characters may reject a shorter-looking string full of emoji.

The count of what a reader sees is the hardest one and is done with the browser's own text segmentation — the same machinery that decides where pressing the left arrow key takes your cursor. That is the right definition of "one character" for anything a person perceives, and it handles the cases that trip up simpler counting: an accented letter written as a base letter plus a combining mark is one, and Hindi and Thai clusters are counted the way a reader of those scripts would.

For ordinary English prose all four numbers are identical, which is why the problem stays invisible until it does not. They diverge on emoji, on accented and combining characters, on non-Latin scripts and on mathematical symbols — and those are exactly the inputs that cause a field to be silently truncated in a database three months after it was built.

When you want something else

In code, use a function that counts what you need rather than the default length. Intl.Segmenter in JavaScript counts what a reader sees; Python 3 strings count code points and len(s.encode("utf-8")) counts bytes; PHP has mb_strlen against strlen for exactly this distinction. The default in most languages is whichever the language found convenient, which is rarely the one your limit means.

When a database field is the constraint, the durable fix is upstream. Declaring a column as utf8mb4 in MySQL, or text in PostgreSQL, removes a whole class of truncation bug — the older utf8 in MySQL is famously only three bytes per character and cannot store an emoji at all. Counting carefully at the form is a workaround for a column that should have been declared differently.

Frequently asked questions

Is my text stored anywhere?

No. Nothing is stored and no request is made, and it keeps working with the network disconnected. That matters more than it looks for text: what people paste into an online counter is unpublished writing, legal drafts, student work and internal documents.

Why are there four different character counts?

Because a "character" has four different meanings and most tools only know one. What YOU see as one character is a grapheme cluster — "é", "🎉" and even "👨‍👩‍👧‍👦" are each one. What JavaScript's string.length reports is UTF-16 code units, where that family emoji is 11. What a regular expression matches is code points, where it is 7. And what a database column or an HTTP header measures is UTF-8 BYTES, where it is 25. All four are shown here, because the one you need depends on who is doing the limiting.

How many characters is an emoji?

One, here — because that is what it is to the person reading it, and it is what a character limit on a modern platform counts. Elsewhere it may be 2, 7 or 11: "👨‍👩‍👧‍👦" is four people joined by three invisible joiner characters, so it is 7 code points and 11 of the units that JavaScript's string.length counts. If a form rejected your text for being too long when it looked short enough, this is usually why, and the byte count on this page will show you the real size.

Why did my 200-character text fail a 255-character database field?

Because the field almost certainly limits BYTES, not characters. In UTF-8, plain English letters take one byte each, but accented letters take two, and Chinese, Japanese, Arabic and emoji take three or four. So 200 characters of Japanese is 600 bytes. The byte count is shown here for exactly this reason — it is the number your database is actually checking.

Why does one emoji cut my SMS limit from 160 to 70?

Because a text message uses a compact 7-bit alphabet that holds 160 characters — and that alphabet has no emoji, no curly quotes and almost no accents. A single character outside it switches the ENTIRE message to Unicode, and the limit drops to 70. A curly apostrophe pasted from Word does it just as easily as an emoji. That is how a short message gets billed as three, and the page tells you the moment it happens.

Does it count spaces?

Both figures are shown at once, so you do not have to choose. Line breaks and tabs count as whitespace too.

Good to know: Four numbers, because "character" has four meanings and the one you need depends on who is doing the limiting. A database VARCHAR counts UTF-8 bytes, a regular expression counts code points, JavaScript counts UTF-16 units, and a person counts what they can see. They disagree most on emoji.

Put this tool on your website

Free for any blog, class page or help article. Paste one snippet and your visitors can use it right on your page.