Code
Base64 Text Encoder and Decoder
Base64 rewrites text using just 64 printable characters, the letters, digits, plus and slash. It is how binary data travels intact through systems that expect plain text, like email attachments. Encode text to Base64 or decode it back here.
Q2lwaGVyUGFk
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
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 move data through a text-only channel without corrupting it, not a way to hide it. Treating Base64 as a security measure is a common and serious mistake.
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 and no key is involved at any point. Its job is to carry data through text-only systems without corrupting it. If you need to protect something, use real encryption such as the Web Crypto API.
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.
Not sure this is the right tool?
If you have a message and you are not certain what it is, the cipher identifier reads the character set and the letter statistics and tells you which scheme it most likely uses, and why. It covers every code and cipher on this site.