Code

Base64 Text Encoder and Decoder

Base64 rewrites text using just 64 safe characters, the letters, digits, plus and slash. It is how binary data rides safely through systems that expect plain text, like email attachments. Encode text to Base64 or decode it back here.

base64.decode
Text
Base64

Result appears here

This is the friendly, learn-by-doing view of Base64. Everything happens in your browser, so paste freely.

How the Base64 Text works

The input is treated as bytes, then those bytes are regrouped into six-bit chunks. Each six-bit chunk maps to one of 64 characters, which is where the name comes from.

Because three bytes become four characters, Base64 output is about a third longer than the input. Padding with equals signs keeps the length a clean multiple of four.

Examples

Hi
SGk=
CipherPad
Q2lwaGVyUGFk
SGVsbG8=
Hello
Decoding Base64 back to text.

History and origins

Base64 emerged with early email standards, when messages could only carry a limited set of characters reliably. Encoding binary as Base64 let images and files travel through text-only channels intact.

It is not encryption and never was: anyone can decode it in a second. It is an encoding, a way to package data safely, not to hide it.

Frequently asked questions

Is Base64 a form of encryption?

No. Base64 is an encoding, not encryption. It hides nothing, since anyone can decode it instantly. Its job is to move data safely through text-only systems.

Why is Base64 output longer than the input?

Base64 turns every three bytes into four characters, so the result is roughly 33 percent larger. Equals signs at the end are padding to keep the length tidy.

Learn more

Go deeper on the ideas behind this tool.

Related translators