A hash function turns any input into a fixed-length fingerprint. The same input always produces the same digest, a tiny change produces a completely different one, and the original text cannot be recovered from it. This tool computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 side by side as you type.
Which algorithm to use
Not all of these are safe. Two are included only because other systems still emit them.
- SHA-256 — the sensible default. Widely supported and with no known practical weakness.
- SHA-512 — the same design with a larger digest; faster than SHA-256 on 64-bit hardware.
- SHA-384 — a truncated SHA-512, used where a 384-bit digest is specified.
- SHA-1 — broken. A practical collision was demonstrated in 2017. Use only to verify legacy checksums.
- MD5 — thoroughly broken. Collisions have been trivial to produce since 2004. Legacy checksums only.
Hashing is not encryption
Encryption is reversible with the right key; hashing is not reversible at all. That is the point of it — a hash proves that two pieces of data are identical without revealing either one.
Because a hash is deterministic, it also cannot hide a value drawn from a small set. Hashing a phone number, a postcode or a common password protects nothing: an attacker simply hashes every candidate and compares. That is what rainbow tables are.
Why passwords need more than a hash
Storing SHA-256 of a password is not safe. General-purpose hashes are built to be fast, and speed is exactly what an attacker guessing billions of candidates per second wants.
Password storage needs a deliberately slow, salted, memory-hard function — Argon2id, scrypt or bcrypt. If you are choosing how to store passwords, none of the algorithms on this page is the right answer.
What "collision" means
A collision is two different inputs producing the same digest. Every hash function has them in principle, since a fixed-length output cannot uniquely represent unlimited input. What matters is whether anyone can produce one deliberately.
For MD5 that takes seconds on a laptop, and for SHA-1 it is within reach of a well-funded attacker. For the SHA-2 family, no method better than brute force is known, which keeps it far out of practical reach.
FAQ
Is my text sent to a server to be hashed?
No. The SHA algorithms use the Web Crypto API built into your browser, and MD5 is computed by a small local implementation. Nothing leaves your device, so it is safe to hash confidential values.
Can a hash be reversed?
Not directly — the operation discards information, so there is nothing to invert. But if the input came from a small or predictable set, an attacker can hash every candidate until one matches. Hashing alone does not make a guessable value secret.
Why do two tools give different digests for the same text?
Almost always a difference in the exact bytes being hashed: a trailing newline, Windows line endings instead of Unix, or a different text encoding. Hashes cover bytes, and a single invisible byte changes the result entirely.
Is MD5 still safe for checking a download?
Only against accidental corruption, and only when the checksum comes from a source you already trust. It gives no protection against a file that was deliberately tampered with, because a matching MD5 can be manufactured. Prefer SHA-256 whenever it is offered.