MIME Encoding
MIME (Multipurpose Internet Mail Extensions) encoding defines the mechanisms for transporting non-ASCII text and binary attachments in email, including the Base64 and Quoted-Printable content transfer encodings.
Purpose
It extends the SMTP protocol, which originally supported only 7-bit ASCII, so it can carry arbitrary byte streams and multilingual text.
Mechanism
The Content-Transfer-Encoding header declares the encoding: 7bit/8bit/binary pass data through; base64 encodes arbitrary binary; quoted-printable escapes only non-printable characters. The Content-Type header declares the MIME type and boundaries.
Use cases
- Email attachment transport
- HTTP multipart/form-data uploads
- Usenet binary attachments
- S/MIME encrypted mail
Examples
- Input
Content-Transfer-Encoding: base64OutputSGVsbG8=The body is Base64-encoded as declared
Common errors
- Decoding a MIME attachment while ignoring the Content-Transfer-Encoding header
- Decode according to the header first, then interpret the result using the charset
Related terms
Base64
Base64 maps arbitrary binary data onto 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) so that binary data can travel over text-only channels. GLOSSARY
Quoted-Printable
Quoted-Printable is a MIME content transfer encoding for mostly-ASCII text: only non-printable characters are escaped as =HH, keeping most of the text readable. GLOSSARY
Charset
A character set (charset) is the mapping table from characters to code points; together with an encoding form (such as UTF-8) it determines how text becomes a byte stream. GLOSSARY
Related tools
MIME Encoder
Encode text to MIME format (Base64 or Quoted-Printable) for email content. Free, private, and 100% client-side. TOOL
MIME Decoder
Decode MIME-encoded text (Base64 or Quoted-Printable) back to original content. Free, private, and 100% client-side. TOOL
MIME Types Reference
Reference table of common MIME types mapped to file extensions with descriptions. Free, private, and 100% client-side. TOOL
Mime Encode Header
Mime Encode Header — pure client-side tool. Privacy-first, no server round-trip. TOOL
Mime Decode Header
Mime Decode Header — pure client-side tool. Privacy-first, no server round-trip. TOOL