Hash Generator
Compute MD5, SHA-1 and SHA-2 digests from text and compare them with a known checksum.
| Algorithm | Digest |
|---|
MD5 and SHA-1 are shown for legacy compatibility and checksum verification only — do not use them for passwords or signatures.
What a cryptographic hash is
A hash function maps any input to a fixed-length fingerprint: MD5 and SHA-1 produce 128 and 160 bits, SHA-256 produces 256. The same input always yields the same digest, a one-character change produces a completely different one (the avalanche effect), and — for a good hash — you cannot work backwards from the digest to the input.
That makes hashes useful for integrity checks: publish the SHA-256 of a release file, and anyone can confirm their download is byte-identical to yours. The same property underlies signatures, commit ids in Git, content-addressed storage and password storage (with a slow, salted variant).
Which algorithm should you pick?
| Algorithm | Digest size | Status |
|---|---|---|
| MD5 | 128 bit | Broken — collisions are trivial to produce. Legacy checksums only. |
| SHA-1 | 160 bit | Deprecated — practical collisions exist (SHAttered). Do not use for new signatures. |
| SHA-256 | 256 bit | Recommended default for integrity and signatures. |
| SHA-384 / SHA-512 | 384 / 512 bit | Strong; SHA-512 is often faster than SHA-256 on 64-bit hardware. |
"Broken" means collision resistance fails: an attacker can craft two different files with the same MD5. That is catastrophic for signatures and certificates, but harmless if you only need a quick checksum to notice a corrupted download.
Hashes are not encryption, and plain hashing is not password storage
A hash cannot be reversed, but it can be guessed: an attacker with a stolen database simply hashes millions of candidate passwords and compares. Unsalted, fast hashes fall in seconds. Password storage needs a deliberately slow, memory-hard algorithm — Argon2id, scrypt, or bcrypt — with a unique salt per user. Never ship sha256(password).
Getting the bytes right
Hashing operates on bytes, not characters, so encoding matters. café in UTF-8 is five bytes and hashes differently from the same word in Latin-1. A trailing newline added by an editor will also change the digest — a very common cause of "the checksum does not match". This page hashes the UTF-8 encoding of exactly what you type, and MD5 is computed in pure JavaScript while SHA-1/2 use the browser's native Web Crypto implementation.
Frequently asked questions
Why do I get a different hash than another tool?
Can I hash a file here?
sha256sum file.zip, shasum -a 256 file.zip) or a small script, since browsers would have to read the whole file into memory.