Base64 Encoder / Decoder
Encode text or files to Base64, and decode it back.
Runs in your browser Runs entirely in your browser. Nothing you put in it ever leaves your device.
Uses - and _ instead of
+ and /, and drops the
= padding, so the result is safe in a URL or a filename.
data: prefix is ignored — so you can paste straight out of a
terminal, an email header or a browser’s devtools.
Unicode is handled properly — emoji, ₹, and every other non-Latin character encode and decode exactly as they went in.
Ready. Nothing is sent anywhere.
Was this useful?
About this tool
Base64 rewrites arbitrary bytes using 64 characters that survive being pasted into things that only handle text — an email header, a JSON field, a data URL, an environment variable. This tool converts both ways, handles Unicode correctly, and will encode a file or hand a decoded one back as a download.
How to use it
- Choose Encode or Decode.
- Paste your text, or pick a file to encode.
- For a URL or a filename, turn on the URL-safe alphabet.
- Copy the result, or download it — including as a file when the decoded data is not text.
Supported input
- Plain text, in any language or script
- Standard Base64 (+ and /) and URL-safe Base64 (- and _)
- Padded or unpadded input
- data: URLs — the prefix is stripped for you
- Any file up to 5 MB
Privacy
Runs entirely in your browser. Nothing you put in it ever leaves your device. Everything happens in JavaScript on this page, so the tool keeps working even if you go offline after it has loaded — which is the simplest way to see for yourself that nothing is being sent. Read the full privacy information.
Questions
Is Base64 encryption?
No, and this is worth being clear about. Base64 is a way of writing bytes down, not a way of hiding them: anyone can decode it, including with this page. Never use it to protect a password, a key or anything else that matters.
Why do other tools mangle my emoji or accented characters?
Because the browser’s built-in `btoa` only understands Latin-1, so it either throws or silently encodes the wrong bytes. This tool converts your text to UTF-8 first, so ₹, é and 🙂 all survive a round trip exactly as they went in.
What is URL-safe Base64?
Standard Base64 uses + and /, which both mean something else inside a URL, and = padding, which gets percent-encoded. The URL-safe alphabet swaps them for - and _ and drops the padding, which is what JWTs and most APIs use.
Is my file uploaded when I encode it?
No. The file is read by your browser and encoded on this page. It never travels anywhere, which you can confirm by disconnecting from the network after the page has loaded — everything still works.
My Base64 decoded to gibberish. What happened?
It probably was not text to begin with — an image or a PDF decodes to bytes that are not valid UTF-8. The tool says so rather than showing you replacement characters, and offers “Download as file” instead.
Related tools
-
URL Encoder / Decoder
Percent-encode and decode URLs and query values.
Stays on your device
-
JSON Formatter
Format, validate and inspect JSON.
Stays on your device
-
UUID Generator
Generate random UUIDs, in bulk.
Stays on your device
-
Hash Generator
SHA-256, SHA-384 and SHA-512 for text or a file.
Stays on your device