Count characters, Unicode code points, non-whitespace characters and UTF-8 bytes as you type.
What is counted?
JavaScript string length counts UTF-16 code units. This tool also shows Unicode code points, characters excluding whitespace and UTF-8 byte length for extra context.
Some visible grapheme clusters, such as combined emoji, can contain multiple Unicode code points.
Related tools
What each count means
“Character” sounds simple, but computers measure text in several ways. This counter shows four numbers because different systems use different ones:
- UTF-16 units: the length that JavaScript and many web forms report. Most letters count as 1, but emoji and some rare characters count as 2.
- Unicode code points: the number of Unicode characters, counting each emoji as 1. This is closer to what most people mean by characters.
- Code points excluding whitespace: the same count with spaces, tabs and line breaks removed, useful when a limit ignores spaces.
- UTF-8 bytes: the storage size of the text in UTF-8, the most common encoding on the web. Databases, APIs and file formats sometimes limit bytes rather than characters.
Worked examples: why the numbers differ
naïve café: 10 UTF-16 units, 10 code points, 12 UTF-8 bytes. The ï and é take two bytes each in UTF-8.- 😀 (one emoji): 2 UTF-16 units, 1 code point, 4 UTF-8 bytes.
- 👨👩👧 (family emoji): 8 UTF-16 units, 5 code points and 18 UTF-8 bytes, even though it looks like one symbol. It is three person emoji joined by two invisible zero-width joiners.
- é can be stored as one precomposed character (1 code point, 2 bytes) or as e plus a combining accent (2 code points, 3 bytes). Both look identical on screen.
What you see as one symbol is called a grapheme cluster. This counter does not count grapheme clusters, so text with combined emoji or combining accents can show higher numbers than the symbols you see.
Character limits you may be working to
- SMS text messages: a single message holds up to 160 characters in the standard GSM 7-bit alphabet, or 70 characters if the text needs Unicode, for example because it contains an emoji or certain accented letters. Longer messages are split into parts that hold slightly fewer characters each. A few symbols, such as €, [ and ], use two GSM positions.
- Social posts and bios: platforms set their own limits and some count certain characters, links or emoji differently. Check the platform’s current counter before you publish.
- Search snippets: search engines truncate titles and descriptions by display width rather than a fixed character count, so treat any character guideline as approximate.
- Forms and databases: a field may limit UTF-16 units, code points or bytes. If text with emoji or non-Latin scripts is rejected below the stated limit, a byte limit is the likely reason.
Tips
- Paste your final text, not a draft. Smart quotes, dashes and invisible characters copied from word processors change byte counts.
- Use the Word Counter when a limit is set in words, and the Case Converter to tidy text before counting.
- The box accepts up to 500,000 UTF-16 units, and everything is counted in your browser.
Frequently asked questions
Does the character counter include spaces?
The UTF-16 and code point counts include spaces, tabs and line breaks. The count labelled excluding whitespace removes them, so you can see both numbers.
Why does an emoji count as 2 characters?
Many emoji sit outside the Basic Multilingual Plane, so JavaScript stores each one as two UTF-16 units. The Unicode code point count shows it as 1. Combined emoji, such as families or flags, contain several code points.
How many characters fit in one SMS?
Up to 160 characters using the standard GSM 7-bit alphabet, or 70 characters when the message needs Unicode, such as when it contains an emoji. Longer messages are sent in several linked parts.
What is the difference between characters and bytes?
Characters are units of text, while bytes are units of storage. In UTF-8, English letters take 1 byte, many accented letters 2 bytes, many Asian scripts 3 bytes and most emoji 4 bytes.
Is my text stored or uploaded?
No. The counts are calculated in your browser as you type, and the text is not sent to a server by this tool.
Why does another site show a different count?
Counters differ in what they treat as a character: UTF-16 units, code points, visible symbols or bytes. Some platforms also weight links or certain characters differently. Compare with the count type the platform uses.