Character Counter

Count characters in real time

0
Total characters
0
Letters
0
Digits
0
Spaces
0
Other symbols
0
Without spaces
0
Lines
0
UTF-16 units
0
UTF-8 bytes

About Character Counter

Character Counter shows nine counts for the text you type or paste: total characters, letters, digits, spaces, other symbols, characters without spaces, lines, UTF-16 code units, and UTF-8 bytes. Characters are counted as you see them, so an emoji with a skin tone, a flag, or an accent typed as a separate mark counts as one. Use it to check a text against a character limit, or the byte size a field will store. It only counts: it does not edit, save, or send the text, and it runs in your browser.

Example

Two lines of text. The line break is one of the 3 spaces, and 👍🏽 is one character but 4 UTF-16 units and 8 bytes.

Text

Café 👍🏽 #1
ok

Counts shown

Total characters: 12
Letters: 6
Digits: 1
Spaces: 3
Other symbols: 2
Without spaces: 9
Lines: 2
UTF-16 units: 15
UTF-8 bytes: 20

How to count characters in a text

  1. 1Paste the text whose length you need to check, or type it in the box.
  2. 2Read the nine counts under it; they change with every keystroke.
  3. 3Compare "UTF-16 units" with a web form's maxlength, or "UTF-8 bytes" with a limit expressed in bytes.
  4. 4Click "Clear" to empty the box.

Formats and limits

Counts
Total characters, Letters, Digits, Spaces, Other symbols, Without spaces, Lines, UTF-16 units, UTF-8 bytes
Spaces
Every whitespace character, tabs and line breaks included
Lines
Zero for an empty box; a line break at the very end adds one more, empty line
Digits
Digits of every script, and number signs such as ½ or ²

Where your text is processed

The counts are recalculated by JavaScript inside this page on each keystroke; the text never leaves your device and is not saved, so a reload empties the box. The page has no error message of its own; if it ever crashed, our error log would receive the error message, the tool name, and your browser's name and version, without your text.

Frequently asked questions

Does the character count include spaces?

Yes. "Total characters" includes spaces, tabs, and line breaks, while "Without spaces" leaves all of them out. The "Spaces" count covers every kind of whitespace, so a text written on two lines always has at least one: the line break.

How are emoji and accents counted?

One each, as they appear: 👍🏽 and 👨‍👩‍👧 each count as one character, and so does é typed as e plus a combining accent. This relies on Intl.Segmenter, which Firefox has had since version 125; older Firefox versions count code points instead, so 👨‍👩‍👧 counts as 5 there.

Is a form's maxlength the same as Total characters?

No. JavaScript and the maxlength of web forms count UTF-16 code units: a plain letter is 1, but 👍🏽 is 4. A limit set in bytes, as in some databases, file formats, and APIs, matches "UTF-8 bytes", where é takes 2 and 👍🏽 takes 8.

Are letters from other alphabets counted as letters?

Yes. é, ß, я, 日, and every other Unicode letter count as letters, and digits of any script count as digits, as do signs like ½ or ². Emoji, punctuation, and symbols such as # go to "Other symbols".

Tips and tricks

  • ✓To count words, sentences, and reading time on the same text, paste it into Word Counter.