Character Counter
Count characters with and without spaces, and see exactly how many code points, UTF-16 units and UTF-8 bytes your text contains. Useful for limits on forms, meta descriptions, SMS and databases.
Your text stays in this browser tab. Nothing is uploaded, saved or logged.
How the Character Counter works
“Characters” here means what a person would count on screen, called a grapheme cluster in Unicode. An emoji such as 👨👩👧 is one character even though it is built from five code points, and “é” typed as e plus a combining accent is also one.
Four different numbers are shown because “length” means different things to different systems. Code points are Unicode’s own count. UTF-16 units are what JavaScript, Java and many APIs report as .length, so 😀 is 2. UTF-8 bytes are what is stored in most files and databases, where 😀 takes 4 bytes and é takes 2.
Characters without spaces removes every whitespace character, including tabs and line breaks, before counting.
How to use it
- Paste your text or type it directly.
- Read the main figure, which is the visible character count.
- Check the byte and UTF-16 figures if you are working against a technical limit.
Example
Accents and emoji make the four measures differ.
Text
Café ☕ for 2? Oui! 🇫🇷
Result
- Characters
- 20
- Without spaces
- 15
- Code points
- 21
- UTF-16 units
- 23
- UTF-8 bytes
- 30
Frequently asked questions
Why is my emoji counted as 1 here but 2 somewhere else?
The other tool is probably reporting UTF-16 units, which is what JavaScript’s .length returns. A single emoji like 😀 is 2 UTF-16 units, and a flag or family emoji can be 4 to 11. The “UTF-16 units” row shows that number so you can compare.
Which number should I use for a database column or an API limit?
Check what the limit measures. MySQL VARCHAR(n) and PostgreSQL varchar(n) count characters (code points), while many file formats and network protocols count bytes. A limit in bytes needs the UTF-8 figure.
Does SMS use these counts?
Not exactly. A standard text message holds 160 characters from the GSM alphabet, but a message that contains an emoji or an accented letter outside that alphabet is sent in a different encoding that fits only 70 characters. Carriers and apps vary, so treat the figures here as a guide and check your provider’s own counter.
Are spaces and line breaks counted?
In “with spaces” every space, tab and line break counts as one character. A Windows line break (CRLF) is a single character on screen, so it counts as one.