Free › Lessons › Lesson

Free lesson · about 7 minutes

Encoding. Encryption. Hashing.

Three ideas people mix up. Learn the difference, then try all three yourself.

The one-line difference

Same data. Three jobs.

Encoding

Make it usable.

Reshapes data so systems can store and send it. Anyone can reverse it. No secret is involved.

  • Example Base64
Encryption

Keep it secret.

Scrambles data with a key so only the right key holder can read it. It protects confidentiality.

  • Examples AES, RSA
Hashing

Prove it is unchanged.

Turns any input into a fixed-length fingerprint. It cannot be run backwards. It protects integrity.

  • Examples SHA-256, SHA-3

The Transform Lab

Type anything. Watch it change.

One sentence, three transformations, live.

Encoding · Base64

No key needed

Encryption · keyed cipher

Needs the key

Hashing · SHA-256

One-way

Watch what happens. The Base64 decodes straight back, no secret needed. The cipher only returns your text when the key matches, and one changed letter turns it into noise. The hash cannot be reversed, and changing one character of the input gives a completely different fingerprint.

The cipher here is a simple teaching demo (a key-seeded stream cipher), not real cryptography. Nothing you type leaves your browser.

What thrillers get wrong

Four things you hear that are not true.

“I reversed the hash and got the password.”A hash has no reverse. Attackers guess inputs and compare fingerprints, which is why strong, salted, slow hashing for passwords matters.
“It is encrypted. It looks like gibberish.”Base64 looks like gibberish and is not encryption. It is encoding, and anyone can decode it in a second.
“She brute-forced the AES key in seconds.”Guessing a modern AES-256 key is out of reach. Real attacks go after weak passwords, stolen keys and flawed software instead.
“Same hash, so it is the same file. Always.”With strong hashes like SHA-256 a match is trustworthy. Older ones, MD5 and SHA-1, can be made to collide and should not be relied on.

Side by side

At a glance.

EncodingEncryptionHashing
Main goalMake data usableKeep data secretVerify data is unchanged
Key neededNoYesNo
ReversibleYes, by anyoneYes, with the keyNo
Output sizeSlightly larger than the inputSimilar to the inputFixed length
Keeps secretsNoYesNo, short inputs can be guessed
Typical useBase64 in email and web addressesHTTPS, disk and file encryptionPassword storage, file integrity, signatures

Remember it like this

A costume, a locked box, a fingerprint.

Encoding

A costume.

Anyone can take it off. It changes how the data looks, not who can see it.

Encryption

A locked box.

Only the right key opens it, and what is inside comes out unchanged.

Hashing

A fingerprint.

It identifies something without letting anyone rebuild it.

Keep learning.

Free lessons today. Certified courses when you are ready.