Visual RFC.
ALL RFCs / RFC 3629
Read the RFC ↗

RFC 3629 / START HERE

UTF-8, before the details

UTF-8: Unicode Transformation Format, 8-bit

UTF-8 represents Unicode characters as sequences of bytes. It lets applications exchange text from many writing systems using a common encoding.

The idea in one picture

  1. Text contains Unicode characters

  2. UTF-8 encodes them as bytes

  3. A reader decodes the same text

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

A letter or symbol must have an agreed byte representation for software to store and transmit it correctly.

A familiar example

A message containing English, Hindi, and emoji can be encoded as UTF-8 and read by compatible software.

Helpful background

You can start here without reading another RFC. The guide introduces its essential concepts as you go.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. Variable-length encodingUTF-8 encodes Unicode values with a leading byte and continuation bytes.
  2. Pack a code pointPayload bits are distributed into the selected byte pattern.
  3. Validate byte sequencesCorrect byte roles are necessary but not enough: range and shortest-form rules matter.
  4. Byte-order markEF BB BF can encode an initial U+FEFF signature, but UTF-8 has no byte-order choice.
  5. Text comparison and securityValid Unicode text does not automatically have one spelling or safe display behavior.
Start with chapter one →

This introduction explains RFC 3629 (2003). Read the original RFC ↗