🔁 Base64 Encoder & Decoder

UTF-8 text · files · data: URLs · URL-safe variant — nothing uploaded

Advertisement

Encode text or a whole file to Base64, and decode it back — UTF-8 correct in both directions, with the URL-safe variant for tokens and query strings. It is an encoding, not encryption: anyone can decode it in a second, so it protects nothing. What it does do is move binary data through channels that only accept text — JSON, XML, e-mail, a data: URL inside a style sheet.

A file instead

Choose a file — it is read locally and never uploaded.

The details that actually bite

Base64 makes data 33% bigger. Four characters carry three bytes, so a 3 MB photo becomes a 4 MB string. That is exactly why data: URLs are a bad idea for anything larger than an icon: the browser must download the whole string before it can parse the CSS or HTML holding it, and it cannot stream, cache separately, or be compressed as well as the raw file. It is also why the same bytes look different when wrapped in newlines — PEM files and Base64 in e-mail insert line breaks every 64 or 76 characters; those breaks are cosmetic and any decoder that is not broken ignores them, which this page does too.

The URL-safe variant (- and _ instead of + and /, usually without padding) exists because + becomes a space in a query string and / is a path separator. JWTs, opaque IDs and signed tokens use it; standard Base64 uses the other alphabet. Sending one where the other is expected gives the classic “signature mismatch” that costs an afternoon. Decoding is not always text: if the bytes are an image, this page tells you the decoded size instead of printing mojibake, and if a character outside the alphabet appears it says so rather than silently skipping it. Nothing here is encrypted — if you need that, Base64 will not help.

Part of Everyday Tools. Need the irreversible direction instead? The checksum tool.

Advertisement
Advertisement