Quoted-Printable Encoder/Decoder

MIME-safe encoding that keeps ASCII readable in email bodies

Free Quoted-Printable encoder and decoder following RFC 2045. Escapes non-ASCII and 8-bit bytes as =XX, keeps printable ASCII readable, wraps lines at 76 columns with soft breaks, and handles UTF-8 round-trips. Client-side. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

When is Quoted-Printable used instead of Base64?

Quoted-Printable is used when the data is mostly ASCII text with only a few non-ASCII characters, such as an English email with a couple of accented names. It keeps the body human-readable, whereas Base64 turns even plain text into an unreadable blob and always grows by a third.

Quoted-Printable is the MIME encoding that keeps a mostly-text email readable while still safely carrying the occasional accented letter, symbol or 8-bit byte. This tool encodes UTF-8 text to Quoted-Printable and decodes it back, following RFC 2045, entirely in your browser.

How it works

Quoted-Printable leaves printable ASCII (33-126) untouched, with one exception: the equals sign is always written as =3D so it can never be confused with an escape. Spaces and tabs pass through except when they fall at the end of a line, where they are escaped to =20 or =09 to survive whitespace-stripping servers. Every other byte, including all multi-byte UTF-8 sequences, is written as =XX using two uppercase hexadecimal digits.

Because email lines should stay under about 76 characters, the encoder inserts a soft line break — an = at the end of a line followed by CRLF — when a line grows too long, never splitting a =XX token across the break. On decode, those soft breaks are removed and the line is rejoined, while each =XX is turned back into its byte and the result is read as UTF-8.

What Quoted-Printable is used for

The Content-Transfer-Encoding header in a MIME email body selects the encoding. When your email client or sending library chooses quoted-printable, the body arrives at the recipient readable in the raw source — English words remain as English words, with only the non-ASCII bytes replaced by =XX sequences. This is its key advantage over Base64, which encodes every byte regardless of whether it needs encoding, producing an opaque block of characters.

Modern email libraries handle this encoding automatically, so you rarely need to encode manually. This tool is useful for:

  • Debugging — decoding a raw email body that was encoded with quoted-printable to read the actual text
  • Testing email pipelines — verifying that your email sending code produces correctly encoded bodies
  • Building custom MIME tools — understanding what the encoding should produce for given input

Soft line breaks explained

Email has a long-standing maximum line length of about 76–78 characters, inherited from early SMTP and RFC 2822. Quoted-Printable meets this limit with the soft line break: an = at the very end of a line signals “this is not a real newline — join me to the next line before decoding”. This is invisible to the reader but essential for correctly reconstructing the original text.

For example, the input text “This is a quite long line that exceeds seventy-six characters when encoded” would be split across two lines ending with =, and the decoder joins them back into one continuous string.

Quoted-Printable versus Base64

CharacteristicQuoted-PrintableBase64
ASCII text sizeSame as inputGrows by ~33%
Non-ASCII byte sizeTriples (=XX)Grows by ~33%
Readability in raw sourceHuman-readableOpaque
Best forMostly ASCII textBinary data, non-Latin text
Used inPlain-text and HTML email bodiesAttachments, media

Tips and notes

Try encoding text with accents or emoji to see how only the non-ASCII bytes become =XX while the English words stay legible. This readability is the whole point: Quoted-Printable is ideal when a human might glance at the raw source. For attachments or heavily binary data, Base64 is more efficient, since Quoted-Printable triples the size of any byte that needs escaping.