Base64 is not encryption
Base64 protects nothing. It is a public encoding, with no key and no password, that anyone can reverse in a second, with this page for instance. A password or an access key written in Base64 is a secret written in plain sight. To hide information you need real encryption.
What is Base64 for?
It rewrites any bytes using 64 safe characters: letters, digits and two symbols. That lets a file travel inside an email, a JSON document, an HTML page or a style sheet. The price is size: the result is about one third larger, because three bytes become four characters.
How to encode or decode
Type in the “Text” box to encode, or paste Base64 into the second box to decode it. Accents, emoji and Asian scripts are handled as UTF-8; Windows-1252 and UTF-16 are also available for old or Windows-specific files.
When decoding, spaces, line breaks, missing padding and the data: prefix are tolerated. A forbidden character is reported with its position. If the result is not text, it is shown in hexadecimal and can be downloaded as a file.
The variants
- Standard: the + and / signs, completed with = up to a multiple of four characters.
- URL-safe (base64url): - and _ instead, often without =, for a web address, a file name or a token.
- MIME: lines of 76 characters, as in emails.
- PEM: lines of 64 characters, as in certificates.
Files, data URIs and JWT tokens
The File tab turns an image or a document into Base64, on its own or as a data URI ready to drop into a page. It also works the other way round. The JWT tab shows a token's header and payload, with readable dates. It does not verify the signature.
Frequently asked questions
Is Base64 secure?
No, in the sense that it hides nothing: anyone can decode it. It is meant to carry data, not to protect it.
Is my data sent anywhere?
No. Text, files and tokens are processed in your browser and are not saved. Only your settings are kept on your device.
Why does the result end with = or ==?
Base64 works on groups of three bytes. When the last group is incomplete, the = sign fills up the block of four characters.
Why do accented letters look wrong after decoding?
The text was probably encoded with another character set. Try Windows-1252 or UTF-16 in the “Text encoding” setting.
How large can a file be?
Up to 500 MB, processed in chunks so the page stays responsive. The real limit depends on your device's memory.