Visual RFC.
ALL RFCs / RFC 2047
Read the RFC ↗
RFC 2047 / EMAIL ENCODED WORDS

Compare Q and B byte encodings

02

Q and B encode bytes, not abstract letters. Q favors recognizable ASCII text; B uses the same Base64 encoding as MIME bodies.

RFC 2047 · § 4.2EXAMPLE
5 / 5
Compare Q and B byte encodingsFive byte-encoding comparisons: a Q underscore represents byte20 in café picnic; a literal underscore, question mark and equals sign use =5F, =3F and =3D; a compact Q payload decodes to four explicit ASCII octets; B encodes the same UTF-8 café bytes as Y2Fmw6k=; both complete words display the same text. Q escaping differs from MIME body quoted-printable.Two byte encodings · Q and B=?UTF-8?Q?caf=C3=A9?==?UTF-8?B?Y2Fmw6k=?=Both display café with UTF-8 supportEncoding ≠ encryption or sender verificationReader supports both Q and B for supported charsets
05
Compare two words with the same display.

=?UTF-8?Q?caf=C3=A9?= and =?UTF-8?B?Y2Fmw6k=?= both display café under the assumed UTF-8 support. Encoding is neither encryption nor proof of a sender.

Source for this drawing: RFC 2047 · Read RFC section 4.2 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Encode special bytes without inserting raw spaces.

  • Encode special bytes without inserting raw spaces.
  • In Q, =HH represents an octet using two hexadecimal digits; uppercase hex is recommended. An underscore represents byte20 (hexadecimal), even if a charset assigns SPACE differently. Literal underscore, question mark and equals sign need encoding.
  • B is MIME Base64. Readers supporting an encoded-word charset MUST handle Q and B. Q is recommended when text is mostly ASCII; otherwise B should be used. Context can further restrict Q’s literal characters.
DETAILS

Header Q is similar to body quoted-printable, not identical: underscore-to-byte20 is a header-Q rule. SPACE and TAB MUST NOT occur raw inside either encoding. All shown byte sequences and display strings are chosen examples, not a requirement to choose one encoding for every Subject. The field name Subject: is outside the encoded word.

Read the RFC section ↗

All chapters in RFC 2047

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗