Developer

Base64 Encode / Decode

Encode text to Base64 or decode Base64 back into plain text.


                

About this tool

Base64 is a way of representing data using only a limited set of safe, printable characters. This tool encodes plain text into Base64 and decodes Base64 back into readable text, so you can move small pieces of data through systems that only handle simple characters.

It exists to solve a specific problem: some channels were built for text and can mangle or reject anything unusual. Encoding turns arbitrary content into a compact run of letters, digits and a couple of symbols that survives those channels intact. That's why Base64 turns up all over the place — embedding small images directly in HTML or CSS as data URIs, carrying binary data inside JSON or XML, encoding the header and payload of a JSON Web Token, and handling attachments in email.

One thing worth being clear about: Base64 is encoding, not encryption. It doesn't protect or hide anything — anyone can decode it back to the original in a moment, exactly as this tool does. It's for making data safe to transport, never for keeping it secret. If you need confidentiality, you need real encryption instead.

Encoding and decoding happen in your browser, so whatever you paste isn't uploaded or stored.

Frequently asked questions

Is Base64 a form of encryption?
No. It's a reversible encoding, not encryption. Anyone can decode Base64 back to the original instantly, so never use it to protect sensitive information — use it only to make data safe to transport.
Why is encoded text longer than the original?
Base64 represents every three bytes of input as four characters, so encoded output is roughly a third larger than the input. That's the expected trade for using only safe, printable characters.
What are the padding "=" characters at the end?
They pad the output to a length that's a multiple of four when the input doesn't divide evenly. They're a normal part of standard Base64 and are needed to decode correctly.
Can it encode files or images?
This tool works with text. Images and other files can be Base64-encoded too (that's how data URIs work), but that's a separate job from encoding the plain text you enter here.
Why does decoding sometimes fail?
Decoding needs valid Base64. Stray spaces, line breaks or characters outside the Base64 alphabet will make it fail, so check the input is a clean encoded string if you get an error.