What is the B64 file format?
.B64 is a plain-text file containing Base64-encoded binary data - a method of representing arbitrary binary content as printable ASCII characters for safe transmission over text-only channels such as email, HTTP headers, or JSON payloads.
Base64 encoding maps every 3 bytes of binary input to 4 characters from a 64-character alphabet (A-Z, a-z, 0-9, +, /), padded with = to make the output length a multiple of four. Following the MIME convention (RFC 2045), lines are wrapped at 76 characters. This encoding increases file size by approximately 33% - a 1 MB binary file becomes roughly 1.37 MB as Base64.
A .b64 file is not compressed and not encrypted - it is simply a different representation of the same binary data. To recover the original file, decode the Base64 content back to binary using base64 -d (Linux/macOS), certutil -decode (Windows), or an online decoder.
Common uses include embedding binary attachments in .eml email files, encoding images or fonts as data: URIs in HTML/CSS, and passing binary data through JSON or XML APIs. The encoding is specified in RFC 4648 (2006); the .b64 extension is an informal convention with no single governing authority.
Security & safety
RISK: MEDIUMBase64 encoding is transparent - the inner file is instantly recoverable by anyone. A .b64 file could encode any payload including malware executables. Do not decode .b64 files from unknown sources without scanning the decoded output first. After decoding, run the result through antivirus before opening. Encoding a file as Base64 does NOT make it safe.
Format details
in a nutshellPrograms that open B64 files
Technical details
deep spec| Encoding algorithm | Base64 per RFC 4648 (canonical); RFC 2045 MIME variant; RFC 1421 PEM variant |
| Character alphabet | A-Z, a-z, 0-9, +, /; padding character: = |
| Input-to-output ratio | Every 3 bytes of binary → 4 Base64 characters (~33% size increase) |
| Line wrapping | 76 characters per line (MIME / RFC 2045); 64 characters per line (PEM / RFC 1421) |
| File encoding | Plain ASCII text (7-bit clean; safe for all text-only transport channels) |
| Compression | None - Base64 encoding increases file size; the wrapped payload may itself be compressed |
| Encryption | None - encoding only; content is trivially reversible and provides no confidentiality |
| Padding | = or == appended so output length is a multiple of 4 characters |
| Size overhead | A 1 MB binary file encodes to approximately 1.37 MB of Base64 text |
| Optional header markers | Content-Transfer-Encoding: base64 (MIME); -----BEGIN / END <TYPE>----- (PEM / RFC 1421) |
| Common use cases | MIME email attachments, data: URIs in HTML/CSS, binary in JSON/XML payloads, PGP/GPG ASCII armor |
| Decoding tools | base64 -d (Linux/macOS), certutil -decode (Windows), [Convert]::FromBase64String() (PowerShell) |
| Released | MIME RFC 2045 (1996); Base64 as a concept dates to Privacy-Enhanced Mail (RFC 1421, 1993); .b64 extension informal convention |
| Latest version | RFC 4648 (2006) - canonical Base64 spec; no versioned file format |
| Open standard | Yes · royalty-free |
| Specification | www.rfc-editor.org |
B64 conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about B64 files.