How to encode and decode Base64
Base64 shows up everywhere — in JSON payloads, data URLs, email attachments, and config files — and it confuses people because it looks like a secret code but isn't one. This guide explains what it actually is, when you need it, and how to encode or decode it in your browser with the free Base64 Encoder / Decoder.
What Base64 is (and isn't)
Base64 represents data using 64 text-safe characters so it can travel through anything that expects plain text. Crucially, it is not encryption — it hides nothing and anyone can reverse it instantly. If a token or value is "just Base64," treat it as readable plain text.
Encoding and decoding text
Paste text into the Base64 tool to encode it,
or paste Base64 to decode it back. If the result ends in one or two
= signs, that's normal — it's padding that fills out the
final group of characters, and a decoder expects it.
Hello, world! → SGVsbG8sIHdvcmxkIQ==
Encoding an image as a data URL
You can also Base64-encode an image to embed it directly in HTML or CSS, so it loads with no extra request. Image to Base64 produces a ready-to-paste data URL. It's great for tiny icons; avoid it for large photos, because Base64 inflates the size by roughly a third.
Base64 vs. URL encoding
They solve different problems. Base64 makes binary data text-safe; URL
encoding escapes characters that have special meaning in a web address
(spaces, &, ?). If what you're really doing
is putting a value into a link, reach for the
URL Encoder instead.
A note on privacy
Base64 strings often wrap tokens or config. The Base64 tool runs in your browser, so nothing you paste is ever uploaded to a server.