One Click Answers

Base64 is not encryption

No, Base64 is not encryption. Base64 text can look scrambled, which leads people to treat it as a form of security, but Base64 is an encoding, which means a standard, reversible way of writing data. There is no key and no secret, so anyone can turn it back.

Proof in one line

A made-up password stored as Base64

Stored value: aHVudGVyMg==

Decoded: hunter2

Decoding takes a moment and needs no knowledge beyond the Base64 alphabet. Any decoder, including a few lines of code, does it.

Encoding, hashing and encryption

  • Encoding changes the format of data so it can be moved or stored. Anyone can reverse it. Base64 is an encoding.
  • Hashing turns data into a fixed fingerprint that cannot be reversed. It is used to check a password without storing it.
  • Encryption scrambles data so only someone with the right key can read it.

Where the mix-up causes harm

A password, token or personal record stored or sent as Base64 is effectively readable by anyone who sees it. Seeing a long string that looks random is not a sign it is protected, so check what the string really is before assuming so.

What to do instead

Use encryption with a key that is kept separate when data must stay private, and store passwords as salted hashes made by a purpose-built password hashing method. Keep Base64 for what it does well: carrying binary data through places that only accept text.

A note on privacy here

Because Base64 offers no protection, avoid pasting real passwords or secrets into any decoder you do not control. Test with made-up values.

Base64 Encoder / Decoder: Decode a Base64 string yourself to see how readable it is.

How we know

Sources

Published by OneClickAnswers.

You might also wonder...

Try it yourself

← All articles

Got another question?

Free, no account. Answers show how they were worked out.