Skip to content
Mbox Viewer

Base64

A binary-to-text encoding scheme that represents arbitrary binary data using only 64 printable ASCII characters, widely used in email to safely transmit attachments and binary content.

Base64 (defined in RFC 4648) encodes every 3 bytes of binary input as 4 printable ASCII characters, chosen from the alphabet A–Z, a–z, 0–9, +, and /. Padding characters (=) are added if the input length is not a multiple of 3. The result is about 33% larger than the original data but contains no characters that could be misinterpreted by text-based mail transport systems.

In MIME email, Base64 is the standard transfer encoding for attachments and binary content. The Content-Transfer-Encoding header is set to base64, and the encoded data appears in the message body in lines of up to 76 characters. When a mail client downloads the message, it decodes the Base64 data back to the original binary before presenting it to the user.

Base64 is also used to encode inline images and, in some cases, HTML bodies or text with heavy use of non-ASCII characters. An email reader must decode Base64 parts transparently so the user sees the original content rather than the encoded ASCII text. Mbox Viewer decodes Base64 as part of its MIME processing pipeline.

Related terms

Read your MBOX files on your Mac