Hash Generator
One-way fingerprints, and which ones still count
A hash function compresses any input into a fixed-length fingerprint with three promises: the same input always gives the same digest, a one-character change scrambles the output completely, and the input cannot be reconstructed from the digest. Those promises make hashes the plumbing of computing: file checksums, Git commits, digital signatures, content addressing, deduplication. The four algorithms here span three generations of trust. MD5 (1992) and SHA-1 (1995) are collision-broken: researchers can manufacture two inputs with the same digest, so both are retired from signatures and certificates, though MD5 survives harmlessly as a quick non-security checksum. SHA-256 and SHA-512, from the SHA-2 family (2001), remain fully trusted and are what this page recommends for anything that matters. One property surprises people the first time: the digest reveals nothing about length or content, a one-word input and a whole book both produce exactly 64 hex characters from SHA-256, and two nearly identical inputs produce digests with no visible relationship at all (the avalanche effect), which is precisely what makes the fingerprint tamper-evident.
The implementation detail worth stating: the SHA digests are computed by your browser's Web Crypto API, the same audited code that secures HTTPS. MD5 is not in Web Crypto (deliberately, given its status), so this page carries a compact implementation that was verified against all eight RFC 1321 test vectors before publication, including the empty string and an 80-character multi-block input. Type "abc" and compare with the vectors quoted above and in the FAQ: matching published vectors is the only honest proof a hash tool can offer.
Test vectors (type these to check any hash tool)
| Input | MD5 |
|---|---|
| (empty) | d41d8cd98f00b204e9800998ecf8427e |
| abc | 900150983cd24fb0d6963f7d28e17f72 |
| The quick brown fox jumps over the lazy dog | 9e107d9d372bb6826bd81d3542a419d6 |
| Input "abc" | Digest |
|---|---|
| SHA-1 | a9993e364706816aba3e25717850c26c9cd0d89d |
| SHA-256 | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
| SHA-512 | ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f |
Hashes at work: three jobs you already rely on
Checksums guard downloads and backups: the digest changes completely if one bit flips, so a matching SHA-256 is near-proof a file arrived intact (and a mismatch means stop, not shrug). Content addressing builds systems on that property: Git names every commit and file by its hash, so history cannot be quietly rewritten, and package registries and Docker images do the same. Keyed hashes do a third job: HMAC mixes a secret key into the hash, producing a tag that proves a message came from someone holding the key and was not altered, which is how API signatures and session tokens are authenticated. Notice what none of these jobs is: none of them hides data. A hash of a low-entropy secret (a PIN, a name, a yes/no answer) can simply be guessed and re-hashed until it matches, which is why fingerprints protect integrity, never confidentiality.
Frequently asked questions
Can I use MD5 or SHA-256 to store passwords?
No. Both are fast hashes, designed to be computed millions of times a second, which is exactly what a password store must not be: an attacker with a leaked database tries billions of guesses per second per GPU. Passwords need slow, salted, memory-hard functions: Argon2id first choice, then bcrypt or scrypt, with a unique salt per user. MD5 and SHA-1 are also collision-broken. SHA-256 remains excellent for file integrity, checksums and signatures, just never for passwords.
What is the difference between hashing and encryption?
Hashing is one-way: the digest cannot be turned back into the input, by design. Encryption is two-way: a key decrypts the ciphertext back to the original. You hash passwords (you only ever need to check a guess, not recover the original), integrity checks and fingerprints; you encrypt data you need to read again, like messages and backups. Confusing the two causes real breaches: a company that 'encrypts' passwords with a reversible scheme has only hidden them behind one key.
Why do MD5 and SHA-1 say 'broken'?
Researchers found practical ways to create two different inputs with the same digest (a collision). For MD5 this has been easy since 2004 and was used by the Flame malware to forge a Microsoft signature; for SHA-1, Google's SHAttered attack produced a real collision in 2017. A collision breaks uses that rely on a digest identifying one unique file, like certificates and signed documents. It does not mean an attacker can take your digest and recover your input (a preimage attack), which remains infeasible for both; but the safe rule is simple: no MD5 or SHA-1 in anything security-relevant and new.
What is a salt and why does it matter?
A salt is a random value stored alongside each password hash and mixed into the computation. It defeats precomputation: without salts, one rainbow table cracks every weak password in a database at once, and two users with the same password visibly share a hash. With unique salts, each password must be attacked individually. A pepper is the same idea kept secret (in configuration or an HSM) rather than stored in the database. Salting is why 'just SHA-256 it' fails even before speed is considered.
How do I verify a downloaded file with a hash?
Compute the digest of the file you received and compare it with the digest the publisher lists, character for character. If they match, the file is bit-for-bit what was published (for SHA-256, a collision is not a practical concern). On a computer: certutil -hashfile on Windows, shasum -a 256 on macOS, sha256sum on Linux. This page hashes text you type rather than files, so for downloads use those built-in tools, and get the reference digest from a different channel than the file itself where possible.
Related tools
Algorithms and test vectors last verified: 23 November 2026. Everything is calculated in your browser — nothing you type is sent anywhere.