MIME Decoding

Enables the decoding of MIME message header extensions for non-ASCII text

Input: Text (UTF-8) or original file bytesResult: Text

Text input

Run to see the result

Examples

Recover a folded email subject with two declared character sets

Decode complete encoded words and fold whitespace, rather than Base64-decoding an entire mail header blindly.

Input

1b2b46cf445aa5c13be21ab2.bin

105 bytes

Download

Expected answer

If you can read this you understand the example.
Encoded adjacent comments whitespace

Input

(=?ISO-8859-1?Q?a?= b)

Expected answer

(a b)
Encoded adjacent CRLF whitespace ignored

Input

5952d834acca3b0f61d128ab.bin

41 bytes

Download

Expected answer

(ab)
Encoded adjacent double whitespace ignored

Input

(=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)

Expected answer

(ab)
Encoded adjacent single whitespace ignored

Input

(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)

Expected answer

(ab)
Encoded comments

Input

(=?ISO-8859-1?Q?a?=)

Expected answer

(a)
ISO Decoding

Input

From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>
To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>
CC: =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>
Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=

Expected answer

From: Keith Moore <moore@cs.utk.edu>
To: Keld Jørn Simonsen <keld@dkuug.dk>
CC: André Pirard <PIRARD@vm1.ulg.ac.be>
Subject: If you can read this you understand the example.
UTF-8 Base64 ASCII-only

Input

Subject: =?UTF-8?B?aGVsbG8=?=

Expected answer

Subject: hello
UTF-8 Base64 multibyte CJK

Input

Subject: =?UTF-8?B?5pel5pys6Kqe?=

Expected answer

Subject: 日本語
UTF-8 Base64 non-ASCII

Input

Subject: =?UTF-8?B?Y2Fmw6k=?=

Expected answer

Subject: café

Format reference: MIME Decoding background and specification

Related tools

Browse data format tools