Encode / decode a MIME word (RFC 2047)

Convert text into a MIME encoded word in RFC 2047 format (used in the "Subject" or "From" headers of emails to carry non-ASCII characters), or decode an already encoded header to get the readable text back.

Example:

How it works

Email headers (Subject, sender...) were historically limited to plain ASCII. RFC 2047 makes it possible to include accented characters by wrapping them in the =?charset?encoding?text?= format, where the encoding is either "B" (Base64) or "Q" (similar to Quoted-Printable). This tool generates or decodes that format automatically.

What is the difference between "B" and "Q" encoding?

"B" encoding turns the entire text into Base64, which is compact but completely unreadable. "Q" encoding only modifies non-ASCII characters (accents, symbols) and leaves letters and digits visible, which makes the header easier for a human to read while remaining standards-compliant.

Why is there an underscore "_" in the result in Q mode?

In the "Q" encoding of a MIME word, a space cannot be written as is: it is represented by an underscore "_", which is automatically converted back to a space when decoding.

Your header text stays on your device: all processing runs locally in JavaScript, with no network request.