A computer stores text as numbers, and what the reader sees depends on the agreement about which number stands for which letter. UTF-8 has become that agreement for the whole internet: according to W3Techs in November 2026, it is used by 99.1% of websites. That is why modern languages, protocols and databases are designed around it by default.
Unicode and encodings
Unicode is not an encoding but a single catalogue of characters: each one has a permanent number, a code point (for example, U+0416 for the Cyrillic letter Zhe). An encoding is a way of writing those numbers as bytes. Unicode has several: UTF-8, UTF-16, UTF-32. They differ in the length of the code unit: 8, 16 or 32 bits.
| Property | UTF-8 | UTF-16 | UTF-32 |
|---|---|---|---|
| Bytes per character (Latin) | 1 | 2 or 4 | 4 |
| Bytes per character (Cyrillic) | 2 | 2 | 4 |
| Bytes per character (emoji) | 4 | 4 | 4 |
| Byte order | none | platform-dependent | platform-dependent |
| Most common in | web, Unix, JSON | Java, Windows | rare, internal formats |
How the bytes are structured
Characters numbered up to 127 (Latin letters, digits, punctuation) take one byte, exactly as in ASCII. So text made of English letters and digits is byte-for-byte identical to ASCII in UTF-8. All other characters are encoded in two, three or four bytes: the first byte gives the length of the sequence, and the rest start with the bits 10.
| Code point range | Bytes in UTF-8 | Example |
|---|---|---|
| U+0000–U+007F | 0xxxxxxx | A = 41 |
| U+0080–U+07FF | 110xxxxx 10xxxxxx | Cyrillic Zhe = D0 96 |
| U+0800–U+FFFF | 1110xxxx 10xxxxxx 10xxxxxx | € = E2 82 AC |
| U+10000–U+10FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx | 😊 = F0 9F 98 8A |
Why UTF-8 won
- ASCII compatibility: old programs and parsers that work with ASCII do not break on UTF-8.
- Self-synchronisation: from any byte, a decoder can see whether it starts a character or continues one, and after an error it resumes at the next character.
- No byte-order problem: UTF-16 and UTF-32 need a BOM or an explicit platform byte order, UTF-8 does not.
- Compact for Latin text: JSON, HTML and source code, which are mostly ASCII, barely grow in size.
UTF-8 was devised by Ken Thompson in September 1992, to criteria set out by Rob Pike, for the Plan 9 operating system. In 2003 the IETF published RFC 3629, which limited the encoding to the range up to U+10FFFF and fixed the UTF-8 label in the IANA registry. The Encoding Standard requires new protocols and formats to use only UTF-8, and tells HTML and XML authors to encode documents in UTF-8 and label them utf-8; in HTML, the string utf-8 is the only valid value of the charset attribute on the meta element.
Sources
the term is written from these pagesVerified 9 Nov