All operations

Quoted-printable

The mail encoding that keeps text readable and writes everything else as =XX.

What is loaded above

The worked example from RFC 2045, section 6.7. Three encoded lines hold one logical line of text, and the output box reassembles them into “Now’s the time for all folk to come to the aid of their country.”

Both = characters at the ends of lines are soft breaks, each saying the line was cut to fit a width limit and that nothing belongs at the join. The RFC picked this text to put a break in two awkward places: after the space that ends the first line, and immediately before the space that opens the third.

How the escapes work

Printable ASCII stays as itself, which is why a quoted-printable body reads as ordinary text. Everything else becomes = and two uppercase hex digits, one pair per byte. In UTF-8, é is =C3=A9 and a non-breaking space is =C2=A0. The equals sign escapes itself, so a literal = is written =3D.

An English message with a few accented words stays legible in raw form, where Base64 would turn the body into an unreadable block. Mail software chooses on that basis: mostly-ASCII text gets quoted-printable, anything else gets Base64.

Soft line breaks

RFC 2045 caps an encoded line at 76 characters. Longer text is split with a trailing =, and a decoder drops that = with the line ending, joining the halves with nothing between. Wrap at sets the limit; 0 disables wrapping.

A break may fall anywhere, including mid-word. It may not fall inside an escape, so =C3 is never split across two lines.

Trailing whitespace

A space or tab at the end of a line is escaped as =20 or =09, even though both are printable. Mail systems have trimmed trailing whitespace since long before MIME, and once trimmed there is no way to know a space was there. Written as an escape the byte survives the relay, so the encoder escapes the last space or tab before each hard line break.

Recognizing it in a raw message

Lines ending in a bare = are the first sign, and = followed by two hex digits scattered through ordinary prose is the second. Runs of =C3 and =C2 mean UTF-8 went through it. A =20 at a line end means whitespace was kept on purpose. The declaring header is Content-Transfer-Encoding: quoted-printable, though a body pulled from a capture often arrives without one.

Base64 is the other MIME transfer encoding, chosen when the payload is binary or largely non-ASCII. URL encoding does the same job for a URL, writing % where this writes =. Hexadecimal reads those escape pairs as bytes.