Base64 is an encoding, not encryption
Base64 turns arbitrary bytes into 64 printable ASCII characters so they can travel through channels that only accept text — email bodies, JSON fields, URLs, HTML attributes. Anyone can reverse it in one step, with no key.
This matters because Base64 gets mistaken for security surprisingly often. A password, an API key or a personal record encoded in Base64 is not protected in any sense; it is merely inconvenient to read at a glance. If the requirement is confidentiality, you need actual encryption.
Why the payload grows by a third
Base64 packs every 3 bytes of input into 4 output characters, so encoded data is about 133% of the original size, plus padding. That overhead is the price of surviving text-only transports.
It is also why inlining large images as data: URIs is a trap: a 300 KB PNG becomes roughly 400 KB of HTML or CSS that cannot be cached separately, cannot be lazy-loaded, and blocks whatever document contains it. Inlining is worth it for tiny icons, rarely for anything else.
Standard versus URL-safe
The standard alphabet uses + and / for its last two characters and = for padding. All three are problematic in URLs: + means a space in query strings, / is a path separator, and = separates parameter names from values.
The URL-safe variant from RFC 4648 replaces + with -, / with _, and usually drops the padding entirely. This is what JWTs use for every segment. This tool accepts both alphabets when decoding and re-adds missing padding automatically, so you can paste a JWT segment directly.
The UTF-8 trap in JavaScript
The browser's built-in btoa() only handles characters in the latin-1 range. Passing it "café" or any emoji throws an InvalidCharacterError, which is why so many hand-rolled implementations quietly corrupt non-English text.
The correct approach — the one used here — is to convert the string to UTF-8 bytes with TextEncoder first, then Base64-encode those bytes, and reverse the process with TextDecoder when decoding. If the decoded bytes are not valid UTF-8, this tool says so instead of returning replacement characters.