Base64 encode and decode
Turn text or a file into Base64, or Base64 back into text, an image or a file. Handles UTF-8, the URL-safe alphabet and missing padding. Runs in your browser.
Loading…
How it works
- 1
Pick encode or decode
Encode turns text into Base64. Decode turns Base64 back into text, or into a file if it holds binary data like an image or PDF.
- 2
Paste text or open a file
Any size works. Files are read on your machine and never uploaded. Decoding accepts data: URLs, line breaks and both alphabets.
- 3
Copy or download
Images show a preview, other binary data a hex view with a download button. Errors point at the exact character.
Questions
- What is Base64?
- A way to write any bytes using only 64 safe characters (A–Z, a–z, 0–9, + and /), so binary data can travel through text: JSON, email, URLs, data: URLs and HTTP headers. It is an encoding, not encryption: anyone can decode it.
- What is URL-safe Base64?
- The same encoding with - and _ instead of + and /, usually without = padding (RFC 4648 §5). JWTs and many URLs use it. Decoding here accepts both automatically.
- Why is my decoded text garbled?
- Either the data isn’t text (an image or a zip, for example), or the text was encoded from something other than UTF-8. Binary data is shown as a hex view with a download instead.
- Is my data uploaded?
- No. Encoding and decoding happen in this tab; the page is blocked from sending anything to a server.