Create an animated lesson
On requestThis article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does hashing work?
TechnologyLesson on requestFree to read
Quick answer
Hashing turns any input — a password, file, or message — into a fixed-length string of characters using a one-way math function. The same input always gives the same hash, but you can't reverse it back, which makes it ideal for verifying data and storing passwords.
Step by step
- It converts any input into a fixed-length 'hash'.
- The same input always produces the same hash.
- It's one-way — you can't reverse it to the input.
- It's used for passwords, integrity checks, and blockchains.
People also ask
How does hashing work?
A one-way function turns any input into a fixed-length string; the same input always yields the same hash.
Why are passwords hashed?
So the actual password isn't stored — only its hash — making stolen data far harder to misuse.
What's the difference between hashing and encryption?
Encryption is reversible with a key; hashing is one-way and can't be reversed back to the input.

