Base64 encode and decode
Turn text or a file into base64, or base64 back into text or a file. Everything happens in your browser: what you paste or pick never leaves this page.
Example: paste your own base64 above.
Decoded text
UTF-8Your order from Café Zoë is on its way ✓ It should arrive on Friday.
Ignored the spaces and line breaks.
How it works
Base64 writes any bytes using 64 safe characters: A–Z, a–z, 0–9, + and /. Every 3 bytes become 4 characters, so the result is about a third larger. One or two = at the end pad the last group. Email uses it to send attachments and non-English text through servers that were built for plain ASCII.
Text has to become bytes first, and that depends on the character set. In UTF-8 (the usual choice) é is two bytes; in ISO-8859-1 it's one. If decoded text shows é where é should be, it was decoded in the wrong character set. Auto uses UTF-8 when the bytes are valid UTF-8, and Windows-1252 otherwise.
There are a few flavours. URL-safe base64 (base64url) swaps + and / for - and _ and usually drops the padding; JSON web tokens use it. MIME base64 breaks lines at 76 characters, as email bodies must. PEM, used for certificates and keys, breaks them at 64. The decoder accepts all of them.
When the decoded bytes aren't text, the tool names the file type from its first bytes (a PNG starts with ‰PNG, a PDF with %PDF) and lets you download it. Base64 isn't encryption: anyone can decode it.
To read a whole email, with its parts, quoted-printable text and =?UTF-8?B?…?= subjects, use the email content decoder.