Base64 Encoder / Decoder
Encode text or files to Base64, or decode Base64 back to text or a downloadable file — instantly, entirely in your browser.
How to use the Base64 Encoder / Decoder
Text tab:
- Paste or type text into the Text panel to see its Base64 encoding appear on the right.
- Paste a Base64 string into the Base64 panel to see it decoded back to text on the left.
- Check URL-safe if you need the
-_alphabet without padding (for example, to embed the result in a URL). - Copy either panel's contents with its Copy button.
Conversion runs automatically a moment after you stop typing in either panel.
File tab:
- Under Encode, drag a file onto the dropzone (or click to browse) — files over 2 MB are rejected before anything is read.
- Click Encode to Base64 to see the result; Copy and Download always use the full string even though the on-screen preview is truncated for very large outputs.
- Under Decode, paste a Base64 string and click Decode to File — this immediately downloads the decoded bytes as a file rather than showing them on screen.
How This Tool Works
The Text tab: typing in the Text panel encodes to Base64 using the browser's native UTF-8 encoder, and typing in the Base64 panel decodes back to text — whichever panel you type in drives the other, so there's no separate encode/decode mode to switch. Nothing you type is ever sent to a server; the conversion happens entirely in your browser.
Decoding is lenient about which Base64 variant you paste: it accepts both the standard alphabet (+, /, = padding) and the URL-safe alphabet (-, _, no padding) without needing to tell it which one it's looking at, and it automatically restores any missing padding.
The File tab handles actual files (up to 2 MB) instead of typed text: drag a file in (or click to browse) and hit Encode to Base64 to get its Base64 representation, or paste a Base64 string and hit Decode to File to get it back as a downloadable file. Decoding never previews or renders the file's contents — it always goes straight to a download, so pasting a Base64-encoded SVG or HTML file here can't execute anything in your browser.