Online Dev Tools

Developer & Security Tools for IT Professionals

Fuel The Infrastructure
Blog

"Base64 Is Not Encryption: What It's For and How to Read It"


There is a recurring bug report that goes something like: "the password is encrypted, look — cGFzc3dvcmQ=." That string is not encrypted. It is Base64, and anyone can turn it back into password in one step. Understanding what Base64 is (and is not) prevents a whole class of security mistakes.

What Base64 actually does

Base64 solves a transport problem, not a secrecy problem. Lots of systems — email headers, URLs, JSON, HTTP — expect text, but plenty of data is raw bytes (an image, a signature, an encryption key). Base64 maps every 3 bytes to 4 printable ASCII characters drawn from A-Z a-z 0-9 + /, with = padding at the end. The result survives systems that would mangle raw binary.

That is the whole job: make bytes safe to travel as text. It is fully reversible by design and requires no key — which is exactly why it provides zero confidentiality. You can confirm this yourself: paste cGFzc3dvcmQ= into the Base64 Encoder / Decoder and it decodes instantly.

Where you will meet it

The mistake to avoid

Base64 looks scrambled to a human, and that resemblance to "encrypted" is the trap. Treating it as protection leads to real leaks:

If you genuinely need confidentiality, you need encryption — a keyed transformation — not encoding. For sharing a secret safely, the Secure Paste tool encrypts text in your browser with a real cipher and shares it as a link, which is the difference that actually matters. To understand the underlying idea in more depth, see Base64 Explained.

The one-line rule

Base64 answers "how do I move these bytes through a text-only channel?" — never "how do I keep these bytes secret?" If you catch yourself calling Base64 "encryption," that is the moment to reach for an actual cipher instead. Decode a sample in the Base64 Encoder / Decoder once and the point makes itself: no key required, no secrecy provided.

Sources

  1. This article is original editorial content published by Online Dev Tools.

Related tools