Unicode and UTF-8 Guide
Unicode gives every character a number, and UTF-8 stores that number as bytes. This guide explains the difference, why emoji count as two characters, and what causes garbled text. Paste text below to see exactly which characters it contains.
Unicode character inspector
| Char | Code point | UTF-8 bytes | Note |
|---|---|---|---|
| Nothing to show yet. | |||
Your text stays in your browser. The table shows the first 200 characters.
Unicode, UTF-8, UTF-16 and UTF-32
| Encoding | Bytes per character | Where you meet it |
|---|---|---|
| UTF-8 | 1 to 4 | The web, most files, Linux and macOS. Compatible with ASCII. |
| UTF-16 | 2 or 4 | JavaScript strings, Windows internals, Java. |
| UTF-32 | 4 | Internal processing, where a fixed size is useful. |
| UCS-2 | 2 | SMS with emoji or non-Latin text. It is why those messages drop to 70 characters. |
Common characters and their codes
| Char | Code point | Name | UTF-8 bytes | Bytes |
|---|---|---|---|---|
| A | U+0041 | Latin capital A | 41 | 1 |
| é | U+00E9 | e with acute | C3 A9 | 2 |
| € | U+20AC | Euro sign | E2 82 AC | 3 |
| ’ | U+2019 | Curly apostrophe | E2 80 99 | 3 |
| — | U+2014 | Em dash | E2 80 94 | 3 |
| ع | U+0639 | Arabic letter ain | D8 B9 | 2 |
| 中 | U+4E2D | Chinese character | E4 B8 AD | 3 |
| 😀 | U+1F600 | Grinning face emoji | F0 9F 98 80 | 4 |
Why this matters for text messages
An SMS holds 160 characters in the GSM-7 alphabet, but only 70 once it contains any character outside that alphabet. A single curly apostrophe pasted from a word processor can do this, even if the message looks like plain English. The SMS character counter shows the encoding and can swap smart punctuation for plain characters.
Why one visible character can be several code points
Some characters are built from parts. A family emoji is several emoji joined with zero-width joiners, a flag is two regional indicator letters, and é can be stored as e plus a combining accent. They look like one character but have a longer count. See also the ASCII table for the first 128 code points.
Frequently asked questions
What is Unicode?
Unicode is the universal character standard. It gives every letter, symbol and emoji a unique number, called a code point, written like U+0041 for the letter A.
What is the difference between Unicode and UTF-8?
Unicode is the list of characters and their numbers. UTF-8 is one way of storing those numbers as bytes. UTF-16 and UTF-32 are other ways of storing the same characters.
Why does one emoji count as two characters?
Many emoji sit outside the range that fits in one 16-bit unit, so UTF-16 stores them as two units called a surrogate pair. JavaScript, SMS and some character counters count those units, so one emoji counts as 2.
Why do I see strange characters like é in text?
That is mojibake: text saved as UTF-8 was read as a different encoding such as Windows-1252. Opening or importing the file as UTF-8 usually fixes it.
What is a zero-width character?
An invisible character with no width, such as the zero-width space (U+200B) or zero-width joiner (U+200D). Paste text into the inspector on this page to reveal them, then remove them with the text cleaner.
How many characters does Unicode have?
Unicode has room for 1,114,112 code points, and more than 140,000 of them are assigned to characters. New versions add characters and emoji regularly.