Quoted-Printable Encoder

Examples
0Characters
0UTF-8 bytes
0Encoded length
0=HH tokens
0Soft breaks

Quoted-Printable encoder

This is a Quoted-Printable encoder and decoder for MIME email: printable ASCII stays, other bytes become =HH. Quoted-printable is a 7-bit MIME encoding for email: printable ASCII stays as-is, other bytes become =HH. Identifiers such as Quoted-printable, MIME, RFC 2045, RFC 2047, UTF-8, CRLF, Q-encoding and Base64 stay untranslated. Show Example encodes café to caf=C3=A9 because é is UTF-8 C3 A9. The chip あ encodes to =E3=81=82. Letter A is not converted.

How to use

  1. Type in Decoded to encode, or in Encoded to decode. Auto convert is on.
  2. Line ending sets CRLF (RFC default), LF or CR for hard breaks and for one-line =0D=0A style bytes.
  3. One line skips the 76-character soft wrap (useful for subjects).
  4. RFC 2047 wraps non-ASCII runs as =?UTF-8?Q?...?= and leaves ASCII such as Subject: in place.
  5. Stats show characters, UTF-8 bytes, encoded length, =HH tokens and soft breaks. Copy decoded / Copy encoded copy one pane; Copy Result copies Encoded.

Soft wraps and one line

RFC 2045 limits encoded lines to 76 characters. This tool inserts a soft break = plus the chosen line ending before that limit, and it will not split a =HH token. Trailing spaces on a line become =20. One line mode does not insert those wraps, matching a typical email subject or display name. Hard newlines in Decoded become real line endings unless One line is on, in which case they are encoded as hex bytes of CRLF, LF or CR.

RFC 2047 MIME headers

Email subjects use encoded-words. Chip RFC 2047 loads Subject: サンプル and encodes to Subject: =?UTF-8?Q?=E3=82=B5=E3=83=B3=E3=83=97=E3=83=AB?=. The chip that pastes =?UTF-8?Q?=E3=82=B5=E3=83=B3=E3=83=97=E3=83=AB?= into Encoded decodes to サンプル. Decode also expands Q and B encoded-words mixed into a header, and drops the space between adjacent encoded-words as RFC 2047 requires. Charset on decode prefers UTF-8; ISO-8859-1 is accepted when the browser TextDecoder supports it.

What the output means

This is not URL encoding: spaces stay spaces (or _ inside a Q encoded-word), not + or %20. Equals must be =3D. UTF-8 is the byte encoding used on this page; GBK and file/data-URI workflows stay on the dedicated Base64 tool. Nothing is uploaded.

Frequently asked questions

  • Difference from percent-encoding? URL Encode uses %. Quoted-printable uses = and is for MIME bodies and headers.
  • Why café not caf=E9? é as Unicode is UTF-8 two bytes C3 A9, so you see two tokens. Latin-1 would be a single =E9.
  • Need GBK? This page is UTF-8. Open Base64 for GBK and files.
  • B encoding? Decode accepts =?UTF-8?B?...?=. Encode on this page uses Q-encoding for headers.

Related tools

Percent-encoding: URL Encode. Binary-safe MIME: Base64. Language escapes: Escape String.

Need percent-encoding? URL Encode →