Skip to content
DevKOM

Character Counter

Find out how long a string really is. 'Length' depends on who is counting: people see characters (graphemes), JavaScript counts UTF-16 units and databases often count bytes. DevKOM shows all of them.

Characters
0
Without spaces
0
UTF-8 bytes
0
Lines
0

How long is it, technically?

Grapheme clusters (what you see)0
Unicode code points (Python len, [...str].length)0
UTF-16 code units (JavaScript .length)0
UTF-8 bytes0
UTF-16 bytes0
Letters · digits · whitespace0 · 0 · 0
Non-ASCII characters0

Character limit

280 characters left

Limits are counted in visible characters. Some services count differently (for example, X counts some emoji as 2).

How to count characters

  1. Paste or type your text.
  2. Compare visible characters, code points, UTF-16 length and UTF-8 bytes.
  3. Set a limit, such as 280 or 160, to see how much room is left.
  4. Clear the input when you're done.

Frequently asked questions

Why is an emoji counted as 1 character but 2 or more units?

Many emoji are outside the Basic Multilingual Plane, so JavaScript's string.length counts them as two UTF-16 units. Some emoji, such as family or flag emoji, are several code points joined together. DevKOM counts what you see as one character.

Why do UTF-8 bytes matter?

Database column limits (for example MySQL VARCHAR in bytes), HTTP headers and many APIs measure size in bytes. Non-ASCII characters take 2 to 4 bytes each in UTF-8.

More in Text Tools.