← All tools

RFC 2047 Encoded-Word Decoder / Encoder

Decode and encode the encoded-word syntax of RFC 2047 — the =?charset?B?…?= (Base64) and =?charset?Q?…?= (Quoted-Printable variant) tokens used to carry non-ASCII text inside email headers (Subject:, From: display names, and so on). Handles multiple adjacent encoded-words, the Q-encoding's underscore-is-space rule, and charsets like UTF-8 and ISO-8859-1. Everything runs locally in your browser.

Decode

Encode

Encoding

An encoded-word (RFC 2047) is =?charset?encoding?text?=. B is Base64 of the text's bytes; Q is the header Quoted-Printable variant, identical to body QP except that _ represents a space (ASCII 32) and a literal underscore must be =5F. The decoder recognises these tokens anywhere in a header, decodes each with its declared charset, and — per RFC 2047 — when two encoded-words are separated by only linear whitespace it drops that whitespace and joins the decoded text. Encoding here always uses UTF-8; decoding honours the declared charset (e.g. ISO-8859-1, UTF-8). Pairs with the Base64 and Quoted-Printable tools. Everything runs locally — nothing leaves your browser.