How it works
Base64 turns arbitrary bytes into a string of 64 printable characters (A–Z,
a–z, 0–9, +, /), padded with = to a multiple of four characters.
This tool encodes your text’s UTF-8 bytes to that alphabet, and decodes it
back the same way — both directions run with the browser’s built-in btoa
and atob, never a server.
Not encryption
Base64 is an encoding, not a cipher. It has no key and hides nothing — anyone can decode it back to the original text in one step. Use it to make binary-safe text for things like data URLs or embedding in JSON, not to keep anything secret.
Why decoding sometimes fails
A valid Base64 string always decodes to some sequence of bytes, but those bytes are only shown here if they form valid UTF-8 text. If you paste the Base64 of an image or other binary file, decoding correctly reports an error instead of printing garbled characters.