Hash Generator
MD5 · SHA-1 · SHA-256 · SHA-512
Generate MD5, SHA-1, SHA-256, and SHA-512 cryptographic hash digests from any text or file, computed entirely client-side using the browser's native Web Crypto API (and a pure-JS MD5 implementation, since browsers dropped native MD5 support). A hash function takes input of any size and produces a fixed-length fingerprint — the same input always produces the same hash, and changing even a single character produces a completely different output, which makes hashes useful for verifying file integrity (comparing a downloaded file's SHA-256 against a published checksum), detecting duplicate content, or storing password digests (with proper salting, never raw). Nothing you hash here is sent anywhere; the computation happens locally so you can safely hash sensitive files or credentials.
Which hash algorithm should I use — MD5, SHA-1, or SHA-256?
For anything security-sensitive (passwords, signatures, integrity against a malicious actor), use SHA-256 or SHA-512 — MD5 and SHA-1 are both cryptographically broken and vulnerable to collision attacks. MD5 and SHA-1 are still fine for non-adversarial uses like deduplication or quick checksums against accidental corruption, which is why they're still widely published alongside SHA-256 for file downloads.
Can a hash be reversed back to the original input?
No — hashing is one-way by design. There's no decoding step; the only way to find an input that produces a given hash is to guess inputs and hash them until one matches (brute-forcing), which is computationally infeasible for random or sufficiently long inputs with a strong algorithm like SHA-256.
Why do two slightly different files produce completely different hashes?
This is the avalanche effect, a deliberate property of cryptographic hash functions: even a one-bit change in the input cascades into roughly half the output bits flipping, so similar inputs never produce similar-looking hashes. It's what makes hashes reliable for detecting any tampering or corruption, no matter how small.