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:
| Method | Counts | A thumbs-up with a skin tone |
|---|---|---|
| Characters as people see them | What a reader sees as one symbol | 1 |
| Unicode code points | Each Unicode value | 2 |
| UTF-16 units | JavaScript and Java string length | 4 |
| UTF-8 bytes | Storage in files and most databases | 8 |
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
| Where | Limit |
|---|---|
| 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 post | 280 (25,000 with Premium), links count as 23 |
| Bluesky post | 300 |
| Threads post | 500 |
| Instagram caption | 2,200 |
| LinkedIn post | 3,000 |
| YouTube title and description | 100 and 5,000 |
| Search result title | about 600 pixels (50 to 60 characters) |
| Search result description | about 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.