What is UTF-8?
UTF-8 is the way most text is stored as bytes today. Type any character below to see its Unicode code point and the exact UTF-8 bytes, then read how ASCII, Unicode and UTF-8 fit together.
The short answer
Unicode gives every character a number, called its code point, written like U+00E9.
UTF-8 is a way of storing those numbers as bytes: one byte for the basic English characters and two, three or four bytes for everything else, covering every code point from U+0000 to U+10FFFF.
ASCII is the older set of 128 characters, and UTF-8 stores each of them as the very same single byte, so plain ASCII text is already valid UTF-8.
ASCII vs Unicode vs UTF-8
| What it is | Covers | Bytes per character | |
|---|---|---|---|
| ASCII | A character set and its 7-bit codes | 128 characters: English letters, digits, punctuation, control codes | 1 |
| Unicode | A list giving every character a number (code point) | Code points U+0000 to U+10FFFF | Depends on the encoding |
| UTF-8 | An encoding: how Unicode code points are written as bytes | Every Unicode code point | 1 to 4 |
The UTF-8 byte patterns
| Code points | Bytes | Bit pattern (x = bits of the code point) |
|---|---|---|
| U+0000 to U+007F | 1 | 0xxxxxxx |
| U+0080 to U+07FF | 2 | 110xxxxx 10xxxxxx |
| U+0800 to U+FFFF | 3 | 1110xxxx 10xxxxxx 10xxxxxx |
| U+10000 to U+10FFFF | 4 | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx |
The first byte says how long the character is: a leading 0 means one byte, 110 two, 1110 three and 11110 four. Every following byte starts with 10. That is how a program can find the start of each character, and how the binary translator spots a byte that doesn’t fit.
Encoding a character by hand
é is U+00E9, which is 233. It falls in the two-byte range, which has 11 payload bits, so write 233 as 11 bits: 00011101001. Split it 5 + 6 into the pattern 110xxxxx 10xxxxxx and you get 11000011 10101001, which is C3 A9 in hex.
€ is U+20AC. It needs three bytes and 16 payload bits: 0010000010101100. Split 4 + 6 + 6 into 1110xxxx 10xxxxxx 10xxxxxx: 11100010 10000010 10101100, or E2 82 AC in hex.
Why does text turn into é and other junk?
If UTF-8 bytes are read with a one-byte encoding such as Windows-1252, each byte becomes its own character. The two bytes of “é”, C3 A9, then show up as “é”. The fix is to read the text as UTF-8. The binary to text and hex to text converters let you switch the encoding to see both readings.
What UTF-8 never contains
- The code points U+D800 to U+DFFF. They are reserved for UTF-16 surrogate pairs, and encoding them in UTF-8 is not allowed.
- Code points above U+10FFFF, which Unicode does not use.
- Overlong forms, such as writing “A” in two bytes. Every character has exactly one valid UTF-8 form, the shortest one.
Sources and method
- RFC 3629 (STD 63), UTF-8, section 3: the 1 to 4 byte patterns for U+0000 to U+10FFFF, and the ban on encoding U+D800 to U+DFFF. Checked 2026-11-25.
- RFC 20 (STD 80), ASCII format for network interchange, section 4: the 128 ASCII codes and control-character names. Checked 2026-11-25.
- WHATWG Encoding Standard (Living Standard, updated 20 November 2026), section 9 (single-byte encodings, used for Windows-1252) and section 14 (UTF-16LE and UTF-16BE decoders). Checked 2026-11-25.
The byte breakdown is built from the RFC 3629 bit patterns, and the tests check it against the browser’s own UTF-8 encoder for one-, two-, three- and four-byte characters.
Questions
Is UTF-8 the same as Unicode?
No. 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.
Is ASCII text valid UTF-8?
Yes. UTF-8 encodes the 128 ASCII characters as the same single bytes, so any ASCII file is also a UTF-8 file.
How many bytes is one character in UTF-8?
One for ASCII characters, two for most accented Latin letters and many other alphabets, three for most other characters including Chinese, Japanese and the euro sign, and four for characters above U+FFFF, which include most emoji.
What does U+ mean?
It marks a Unicode code point written in hex. U+0041 is code point 65, the letter A.