A hash function turns any input into a fixed-length fingerprint, and the same input always produces the same output. The interesting question is not which hash is fastest but which guarantees you actually need — because for passwords, fast is precisely wrong.
What 'broken' means
A hash is broken when someone can produce two different inputs with the same output — a collision. MD5 collisions can be generated in seconds on ordinary hardware, and SHA-1 collisions have been demonstrated in practice. Both remain perfectly good at detecting accidental corruption, and useless against anyone deliberately trying to forge a match.
That distinction matters. Using MD5 to check that a download completed intact is fine. Using it to verify that a file has not been tampered with by an attacker is not, because the attacker can construct a file that matches.
Passwords need a slow hash, not a strong one
SHA-256 is cryptographically strong and still the wrong choice for storing passwords, because it is fast. Modern hardware computes billions of SHA-256 hashes per second, so a stolen database of fast hashes falls to a dictionary attack quickly.
Password hashing functions — bcrypt, scrypt, Argon2 — are deliberately slow and memory-hungry, with a tunable cost factor. They also salt each password, so identical passwords produce different hashes and one precomputed table cannot attack the whole database at once.
Verifying a download
Publishers list a checksum, usually SHA-256, alongside a release. Hash the file you received and compare the two strings character by character; if they differ at all, do not run it.
This catches a truncated or corrupted download reliably. It only catches a malicious substitution if you trust the channel the checksum came from — a checksum published on the same compromised page as the file proves nothing.
In short
SHA-256 for integrity, a purpose-built slow function for passwords, and MD5 only for detecting accidents. Never treat a hash as reversible — it isn't, by design.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes for text or files, without uploading anything.
Keep reading
Why your link preview isn't showing, and how to fix it
A shared link with no card is nearly always one of five things. How previews are fetched, which tags matter, and why Slack works when WhatsApp won't.
How to read a regular expression without panicking
Regex looks like line noise until you know the four things it is made of. A practical guide to reading any pattern, plus the mistakes that waste the most time.
How to read messy JSON, and fix the errors it throws
Deeply nested API responses are hard to hold in your head. How to navigate JSON structurally, and what the three most common parse errors actually mean.