Quoted-Printable Encoder / Decoder
A Quoted-Printable Encoder / Decoder converts between raw bytes and the RFC 2045 =XX escape form used by email, handling soft line breaks, trailing whitespace and RFC 2047 encoded words — entirely in your browser.
CR and LF are treated as line breaks. Trailing whitespace is encoded and lines are wrapped at 76 characters with soft breaks, both of which RFC 2045 requires.
- Decoded36 bytes
- Bytes426f 6e6a 6f75 722c 2076 6f69 6369 2075 6e20 6361 66c3 a920 7472 c3a8 7320 6368 6175 642e
About Quoted-Printable Encoder / Decoder
Quoted-Printable is the encoding that keeps mostly-ASCII text readable while still surviving a 7-bit transport: a byte becomes =XX and everything printable stays as it is. The encoding is trivial and the two rules around it are what implementations get wrong. Trailing whitespace must be encoded, because a transport is allowed to strip a literal space at the end of a line — which is why a message can verify locally and fail after sending. And lines must not exceed 76 characters, with a line ending in a bare = being a soft break that carries no data; a decoder that treats it as data inserts a stray = every 76 bytes, and an encoder that omits it hands the wrapping decision to a transport that will make it in the wrong place. Both are handled here and both are reported. The other half of the tool is the form most people actually meet: the =?UTF-8?Q?...?= encoded word in a Subject or From header. Those follow different rules — an underscore means a space, the charset is declared inline per word rather than assumed, and whitespace between two adjacent encoded words is a separator that must be dropped rather than kept — so decoding a header with a body decoder is exactly why subject lines come out full of underscores. Both Q and B encoded words are decoded, since real headers mix them, and because the charset is read from the word rather than guessed you get é instead of é.
What Quoted-Printable Encoder / Decoder does
- Encodes trailing whitespace as =20 and =09, which RFC 2045 requires
- Wraps at 76 characters with soft line breaks, never splitting an escape
- Decodes =?UTF-8?Q?...?= and =?UTF-8?B?...?= email headers
- Reads the charset from the encoded word instead of assuming UTF-8
- Drops the separator whitespace between adjacent encoded words, per RFC 2047
- Treats CR and LF as data in binary mode, as line breaks in text mode
- Reports lowercase hex, stray '=' and over-long lines as non-conforming
- Shows the decoded bytes in hex, since the encoding is about bytes not text
When to reach for Quoted-Printable Encoder / Decoder
- Reading a Subject line that arrived as =?UTF-8?Q?...?= in a log or a raw message
- Working out why an email body is full of =C3=A9 or stray = characters
- Checking whether a mail library is encoding trailing whitespace correctly
- Encoding a header value by hand while debugging an SMTP conversation
How to use Quoted-Printable Encoder / Decoder
- 01
Choose where it came from
Message body for ordinary content, or Header for anything that looks like =?UTF-8?Q?...?=. The two follow different rules and picking the wrong one is the usual cause of a confusing result.
- 02
Paste the text
Decoding is the default. Soft line breaks, transport padding and mixed Q and B words are all handled.
- 03
Set the charset if needed
Quoted-Printable encodes bytes, not text. Headers declare their own charset; for a body it comes from the message's Content-Type, and getting it wrong is what turns é into é.
- 04
Read the notes
Anything non-conforming in the input is reported — lowercase hex, a stray '=', over-long lines, or trailing whitespace that was never encoded and may already have been stripped.
When to use Quoted-Printable Encoder / Decoder vs alternatives
| Alternative | Use Quoted-Printable Encoder / Decoder when… | Use the alternative when… |
|---|---|---|
| A generic online quoted-printable decoder | your input is a header rather than a body. Those decoders miss that an underscore is a space and that the charset is declared per word, which is why they return underscores and mojibake. | you have a plain body and only want the text. |
| Python's quopri module | you want the non-conforming parts of the input pointed out rather than silently accepted, and you do not want to write a script to read one header. | you are decoding messages in bulk from a script. |
| Base64 | the content is mostly ASCII and you want it to stay readable in transit and in a diff. | the content is mostly binary — Quoted-Printable triples the size of arbitrary bytes, where Base64 adds a third. |