Skip to content
uencoder

Quoted-Printable

Quoted-Printable is a MIME content transfer encoding for mostly-ASCII text: only non-printable characters are escaped as =HH, keeping most of the text readable.

Purpose

When text is mostly ASCII with only a few non-ASCII characters, it expands far less than Base64 and stays human-readable.

Mechanism

Printable ASCII (33-126, except =) passes through unchanged; every other byte becomes = followed by two uppercase hexadecimal digits. Line endings use = soft line breaks (encoded lines stay within 76 characters), and spaces or tabs at the end of a line must also be escaped.

Use cases

  • Email bodies in Chinese and European languages
  • vCard contact field encoding
  • MIME header parameter values
  • SMTP UTF-8 fallback

Examples

  • Input
    café
    Output
    caf=C3=A9

    é (U+00E9) encodes to UTF-8 bytes C3 A9, escaped as =C3=A9

Common errors

Unescaped trailing spaces being lost during decoding
Strictly follow RFC 2045: escape trailing spaces as =20 and tabs as =09

Related terms

Related tools

References