quoted-printable encode & decode online
Encode or decode text with quoted-printable. No key needed, fully reversible, and nothing leaves your browser.
What stays readable and what becomes =XX
Printable ASCII stays as it is. Every other byte, and the = sign itself, becomes = and two hex digits: ü is two bytes in UTF-8, so it becomes =C3=BC. Long lines get a soft line break.
G47rr72ü=C3=BCc3 bcß=C3=9Fc3 9fee657 bytes in, 15 characters out: +114 %
Typing in the tool above fills this in. Nothing leaves your browser.
What is Quoted-printable?
Quoted-printable is the e-mail encoding for text that is mostly ASCII: normal letters stay readable, every other byte becomes = and two hex digits, so ü in UTF-8 is =C3=BC. Lines are kept under 76 characters with a soft line break, an = at the end of the line. It is defined in RFC 2045 (MIME); mail headers use a variant with _ for spaces.
- E-mail bodies with umlauts
- Mail subjects (=?UTF-8?Q?…?=)
- vCard and iCalendar files
- Reading raw .eml source
Why won't my Quoted-printable decode?
Paste what you have. The check tells you what is wrong, what kind of data is inside and shows the decoded result.
- Paste text above or try an example.
Mail body and mail header forms
The same input in the forms you meet in practice. Shown for Grüße; type in the box above or in the tool to use your text.
- Body (quoted_printable_encode)what the tool returns
Gr=C3=BC=C3=9Fe- Mail header, Q encodingRFC 2047, e.g. Subject:
=?UTF-8?Q?Gr=C3=BC=C3=9Fe?=- Mail header, B encodingRFC 2047 with Base64
=?UTF-8?B?R3LDvMOfZQ==?=
The same result in your code
Every snippet encodes Grüße to Gr=C3=BC=C3=9Fe exactly like the tool, then decodes it back. They are run and compared with the tool before each release.
echo quoted_printable_encode('Grüße'), "\n"; echo quoted_printable_decode('Gr=C3=BC=C3=9Fe'), "\n";
import quopri print(quopri.encodestring("Grüße".encode()).decode()) print(quopri.decodestring("Gr=C3=BC=C3=9Fe").decode())
Matches PHP for normal text. quopri leaves tabs alone and writes soft line breaks as =\n, PHP writes =09 and =\r\n.
package main import ( "fmt" "io" "mime/quotedprintable" "strings" ) func main() { var sb strings.Builder w := quotedprintable.NewWriter(&sb) w.Write([]byte("Grüße")) w.Close() fmt.Println(sb.String()) b, _ := io.ReadAll(quotedprintable.NewReader(strings.NewReader("Gr=C3=BC=C3=9Fe"))) fmt.Println(string(b)) }
Node.js, browsers and Java have no built-in quoted-printable functions; mail libraries (nodemailer, Jakarta Mail) include them.
Quoted-printable examples and test values
What the tool returns for these inputs (UTF-8). Use them to check your own code. ↵ marks a line break (CRLF).
| Input | Quoted-printable |
|---|---|
hello world | hello world |
Grüße aus München | Gr=C3=BC=C3=9Fe aus M=C3=BCnchen |
1 + 1 = 2 | 1 + 1 =3D 2 |
€ 10 | =E2=82=AC 10 |
Grüße aus München! Diese Zeile ist absichtlich länger als sechsundsiebzig Zeichen. | Gr=C3=BC=C3=9Fe aus M=C3=BCnchen! Diese Zeile ist absichtlich l=C3=A4nger a=↵
ls sechsundsiebzig Zeichen. |
Why your Quoted-printable doesn't match
A line ending in = is a soft line break: it only keeps lines under 76 characters and disappears when decoding. Don't delete the = by hand, or the words on both sides run together wrongly.
Because = starts every escape, the character = itself is written =3D. 1+1=2 becomes 1+1=3D2.
A subject like =?UTF-8?Q?Gr=C3=BC=C3=9Fe?= is quoted-printable for headers (RFC 2047): with _ for spaces and the charset in front. The tool encodes mail bodies; the variants below show the header forms.
Both are ü: =FC in ISO-8859-1, =C3=BC in UTF-8. The charset is in the Content-Type header of the mail part. Decode with the wrong one and you get ü or �.
E-mail uses CRLF line breaks, and so does PHP. Python's quopri writes soft breaks as =\n and leaves tabs alone; PHP writes =\r\n and encodes tabs as =09.
Like the form on the original site, the tool removes spaces and line breaks at the start and end, and sends line breaks as CRLF (\r\n). That is why a result can differ from your code by one line break.
Questions about Quoted-printable
What does =C3=BC mean?
It is the letter ü: =XX writes one byte in hex, and ü is the two bytes C3 BC in UTF-8. In ISO-8859-1 the same letter is =FC.
Why do e-mails have = at the end of lines?
That = is a soft line break. Quoted-printable keeps every line under 76 characters; when the text is decoded, the = and the line break disappear and the lines join again.
Quoted-printable or Base64 for e-mail?
Quoted-printable for text that is mostly ASCII, because it stays readable and small. Base64 for attachments, images and text that is mostly non-Latin, where quoted-printable would triple the size.
What is =?UTF-8?Q? in a subject?
An encoded word (RFC 2047): Q encoding, a quoted-printable variant for headers with _ for spaces. =?UTF-8?B? is the same with Base64. Paste a subject line into the check panel to decode it.