Base64 Encoder / Decoder
Convert text or files to Base64 and back in a click. Handles Unicode, offers a URL-safe alphabet, and runs entirely in your browser.
or drag it here
The decoded data isn't text. Download it as a file instead.
What Base64 is for
Some channels only carry text — a JSON field, a URL, an email body, a CSS file. Base64 lets you push binary data through them by re-encoding it with 64 safe characters. It isn't compression or encryption: the output is about a third larger than the input and anyone can decode it. It just makes binary data survive a text-only trip.
How to use it
- Pick a direction. Choose Encode to turn text or a file into Base64, or Decode to turn Base64 back.
- Provide your input. Type text, or switch the source to File and drop a file in. The output updates as you go.
- Tune the output. Flip on URL-safe mode if the result needs to live in a URL or filename, then copy it.
Standard vs. URL-safe
- Standard Base64 uses
+,/and=padding — the default almost everywhere. - URL-safe Base64 replaces
+and/with-and_and drops the padding, so it's safe in query strings, JWTs and filenames.
Frequently asked questions
What is Base64?
Base64 is a way to represent binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It's used to embed images in CSS or HTML, send binary data in JSON or email, and store data in places that only accept text.
Does it handle Unicode text?
Yes. Text is encoded as UTF-8 before being Base64-encoded, so emoji and non-English characters round-trip correctly. When decoding, valid UTF-8 is shown as text and anything else is offered as a file download.
What is URL-safe Base64?
URL-safe Base64 swaps the + and / characters for - and _ and drops the trailing = padding, so the result can be used in URLs and filenames without escaping. Turn the option on when encoding; decoding accepts either variant automatically.
Is my data uploaded anywhere?
No. Encoding and decoding run entirely in your browser with JavaScript. The text and files you provide are never sent to a server, logged or stored.
Why did decoding fail?
Decoding fails when the input isn't valid Base64 — for example it has the wrong length or contains characters outside the Base64 alphabet. Remove any stray characters and make sure you pasted the whole string.