Base64 decode and encode
Use this Base64 decode tool to turn Base64 into text, or into the image or file it holds; switch to Encode to turn text into Base64. Base64URL and missing padding work without any settings.
- Free
- No sign-up
- Runs in your browser
- Text, images and files
Paste Base64 to see what it says.
How to use it
- 1Choose Decode or Encode, then paste or type in the box.
- 2Read the result beside or below the box; for encoding, pick Standard or Base64URL and the padding.
- 3Copy the result, or download the file a Base64 string holds.
How Base64 works
Base64 writes bytes as text. Every 3 bytes become 4 characters from a 64-character alphabet (A–Z, a–z, 0–9, + and /), so the result is about a third longer than the original. It’s how email attachments, data: URLs and many APIs carry images and other files inside text.
To decode, the page reads the characters back into bytes. If those bytes are valid UTF-8 text, you see the text; otherwise it checks the first bytes for a known file type and lets you save the file. Line breaks and spaces, common in email, are ignored.
Encoding works the other way: your text is turned into UTF-8 bytes, so accents and emoji survive, and then into Base64. The browser’s own btoa() fails on characters outside Latin-1; this Base64 encode step doesn’t.