Home / Text guides / Guide: character count

Character Count Explained

What a character count really counts, why two tools can give different numbers, and which limits matter where you write.

The short answer

A character count is the number of letters, digits, spaces, punctuation marks and symbols in a text. Whether spaces and line breaks are included, and how emoji are counted, depends on the tool. That is why two counters can disagree about the same text.

With spaces and without spaces

Characters with spaces counts everything you typed. Characters without spaces leaves out the spaces, and usually the tabs and line breaks too. Essays and applications often ask for one or the other, so check which. The character counter with spaces shows both.

Line breaks

A line break is one character on Mac and Linux and two on Windows. Some forms count every line break as two characters. If you are close to a limit, test the text in the real form.

Emoji, accents and Unicode

A single emoji can be made of several Unicode values. A thumbs-up with a skin tone is two code points, and a family emoji can be seven. Languages also report different numbers for the same string:

MethodCountsA thumbs-up with a skin tone
Characters as people see themWhat a reader sees as one symbol1
Unicode code pointsEach Unicode value2
UTF-16 unitsJavaScript and Java string length4
UTF-8 bytesStorage in files and most databases8

Characters and bytes

A byte is a unit of storage. In UTF-8, English letters take one byte, accented letters two, most Asian characters three and emoji four. When a limit is set in bytes, such as a field in an API, a text with many non-English characters reaches it sooner. Use the byte counter to check.

Limits to know

WhereLimit
SMS, standard alphabet (GSM-7)160 in one message, 153 per part when joined
SMS with emoji or other scripts (UCS-2)70 in one message, 67 per part when joined
X post280 (25,000 with Premium), links count as 23
Bluesky post300
Threads post500
Instagram caption2,200
LinkedIn post3,000
YouTube title and description100 and 5,000
Search result titleabout 600 pixels (50 to 60 characters)
Search result descriptionabout 920 pixels on desktop, 680 on mobile

Check live counts with the X character counter and the meta description counter. Platforms change their limits, so confirm important numbers in the app.

How to count characters in other tools

  • Word: Review, then Word Count. It shows characters with and without spaces.
  • Google Docs: Tools, then Word count (Ctrl+Shift+C, or Cmd+Shift+C on Mac).
  • Excel and Google Sheets: =LEN(A1) counts with spaces, and =LEN(SUBSTITUTE(A1," ","")) counts without spaces.

Counting in code

// JavaScript: characters as people see them
[...new Intl.Segmenter().segment(text)].length
// UTF-16 units
text.length

# Python: code points, and UTF-8 bytes
len(text)
len(text.encode("utf-8"))

// PHP: characters, and bytes
mb_strlen($text);
strlen($text);

// Java: code points, and UTF-16 units
text.codePointCount(0, text.length());
text.length();

Related tools

Count sentences and paragraphs, letters with the letter counter, or read the guide to counting letters and the guide to counting lines.

Count your text now. See characters with and without spaces, line breaks and words as you type.

Open the character counter

Frequently asked questions

Do spaces count as characters?

Yes, in a count with spaces. A count without spaces leaves them out.

Why do two character counters give different numbers?

They may treat spaces, line breaks and emoji differently, or count code units instead of visible characters.

How many characters is an emoji?

It depends on the tool. As a reader sees it, one. In UTF-16 it is two to eight units, and in UTF-8 it takes four or more bytes.

How do I count characters in Word?

Choose Review, then Word Count. The box shows characters with and without spaces.