Text encoding

UTF-8

The specific way most of the text on the web gets turned into bytes — and why it won over the alternatives.

What it is

UTF-8 is an encoding — a specific method for representing Unicode code points as sequences of bytes. It's a variable-width encoding: common characters like the basic English alphabet take one byte each, while characters from other scripts or symbols like emoji take two, three, or four bytes, depending on how large their code point is.

Why it's backward-compatible with ASCII

UTF-8 was deliberately designed so that the first 128 Unicode code points — which are identical to the original ASCII character set — encode to exactly the same single bytes ASCII always used. A plain-English text file encoded in ASCII is, byte-for-byte, already valid UTF-8. This compatibility was a major reason UTF-8 could be adopted incrementally across existing systems rather than requiring a hard break.

Why it became dominant

UTF-8 combines universal character coverage (anything Unicode can represent) with efficient storage for the still-common case of plain English or ASCII-heavy content, no byte-order ambiguity to resolve (unlike UTF-16 and UTF-32, which is exactly why the Byte Order Mark exists for those encodings but is unnecessary for UTF-8), and straightforward compatibility with existing tools built around single-byte text. It's now the encoding of the overwhelming majority of web pages and is the default assumption of most modern software.

Where it still causes friction

Even though UTF-8 doesn't need a BOM, some tools — notably Windows Notepad and various legacy editors — still write one out of habit, prepending three specific bytes that are meaningless to UTF-8's own logic but that other software may not expect. That's the single most common practical UTF-8 issue this site's invisible character finder gets used to diagnose.

Source

RFC 3629 — UTF-8, a transformation format of ISO 10646, IETF.

Related

Unicode BOM (Byte Order Mark) ASCII

Back to the full glossary — 200 terms covering case conversion, style guides, and text tools.