RFC 2047 Email Header Encoder & Decoder

Decode email subject lines and headers encoded with RFC 2047 MIME encoded-words (like =?utf-8?B?...?= or =?iso-8859-1?Q?...?=) into readable text. Or encode plain text into RFC 2047 format for use in email headers that contain non-ASCII characters. Essential for email developers and anyone debugging email delivery issues.

RFC 2047 Email Subject Encoder

Encode email subjects using RFC 2047 format (like =?utf-8?B?...?=).

RFC 2047 Email Subject Decoder

Parse email subjects encoded with RFC 2047 (like =?utf-8?B?...?=) into readable text.

How It Works

RFC 2047 defines the "encoded-word" format for representing non-ASCII text in email headers. The format is =?charset?encoding?encoded-text?= where charset is the character set (e.g., UTF-8, ISO-8859-1), encoding is either B (Base64) or Q (Quoted-Printable), and encoded-text is the actual encoded content.

This was necessary because the original email standard (RFC 822) only allowed ASCII characters in headers. The encoder converts your text to UTF-8 bytes, then Base64-encodes them and wraps them in the encoded-word format.

Common Use Cases

  • Email debugging — Inspect raw email headers to understand garbled subject lines or sender names containing non-Latin characters.
  • Email development — Encode subject lines with Unicode characters (Hebrew, Arabic, Chinese, Japanese, emoji) for SMTP transmission.
  • Mail server administration — Decode log entries showing encoded email headers.
  • Spam analysis — Decode obfuscated email subject lines used in phishing or spam campaigns.

Frequently Asked Questions

What is RFC 2047?

RFC 2047 is an Internet standard that defines how non-ASCII characters can be represented in email headers using encoded-words. It allows email subjects, sender names, and other header fields to contain characters from any language or script.

What's the difference between B and Q encoding?

B uses Base64 encoding, which is more compact for non-Latin text. Q uses Quoted-Printable encoding, which is more readable for mostly-ASCII text with a few special characters.

Why do email subjects appear as =?utf-8?B?...?=?

Your email client should decode these automatically. If you see the raw encoded form, your client may not support RFC 2047 or the encoding may be malformed.

What character sets are supported?

This decoder supports any charset specified in the encoded-word. The encoder uses UTF-8, which covers all Unicode characters.

Related Tools