Base64 – encode and decode
Encode text or files to Base64, or decode Base64 to text or a file. The tool guesses the direction and file type itself, handles accents and emoji correctly – and nothing leaves your browser.
What you paste never leaves your browser and is never stored
Once the page has loaded, the tool also works without internet – try turning off Wi-Fi. The first visit needs an internet connection.
Base64 is not encryption – anyone can decode it. So rather decode a Basic Auth header or a key here than on a site with a save button: what you paste is sent nowhere.
Large files (50 MB and more) are encoded and decoded in a Web Worker with progress and Cancel, so the page does not hang.
How it works
- Paste text or Base64, or choose a file.
- The tool guesses whether to encode or decode. Choose the direction yourself if the guess is wrong.
- Optionally choose Base64URL, line breaks after 76 characters or data URI.
- Copy or download the result. A decoded file gets the file type the tool recognised.
Frequently asked questions
Why do accented letters turn into odd characters elsewhere?
The browser's built-in btoa() only handles characters up to ÿ, so accents beyond that and emoji break. Here the text is encoded as UTF-8 first, so every character comes back correctly.
What is Base64URL?
A variant where + and / are replaced by - and _, and the trailing = is dropped, so the result can go in a URL or a file name. JWTs use Base64URL.
When does a data URI make sense?
For small images and icons directly in CSS or HTML, such as a logo in an email template. For large files a normal file is better: Base64 is a third larger.
Are my files uploaded?
No. The file is read and encoded in your browser, and nothing is sent or stored.
See also
Found a bug or have an idea? Send an email
More tools in DevKit
- JSON formatter and validator JSON formatter
- JWT decoder JWT decoder
- Hash generator Hash generator
- UUID and ULID generator UUID generator
- Unix timestamp converter Unix timestamp