Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes. Compare and verify hashes.
How to use Hash Generator
Frequently Asked Questions
What is a cryptographic hash?
A cryptographic hash function takes any input — text, a file, or raw data — and produces a fixed-length output string called a digest or hash. The same input always produces the same hash, but even a single character change in the input produces a completely different hash. Hashes are one-way functions — it is computationally infeasible to reverse them to recover the original input.
What is the difference between MD5, SHA-1, SHA-256 and SHA-512?
MD5 produces a 128-bit (32-character hex) hash; SHA-1 produces 160 bits (40 chars); SHA-256 produces 256 bits (64 chars); SHA-512 produces 512 bits (128 chars). Longer outputs provide stronger collision resistance. MD5 and SHA-1 have known practical collision vulnerabilities and should not be used for security-sensitive applications. SHA-256 and SHA-512 are currently considered secure.
Is my text sent to a server?
No. MD5 and SHA-1 are computed using the crypto-js library, which runs entirely as JavaScript in your browser with no network requests. SHA-256 and SHA-512 use the browser's native Web Crypto API (window.crypto.subtle). In both cases, your input text never leaves your device and is never logged or stored anywhere.
What is a hash collision?
A hash collision occurs when two different inputs produce the same hash output. MD5 has known practical collision attacks — meaning a malicious file can be crafted to have the same MD5 hash as a legitimate file, making MD5 verification unreliable for security. SHA-1 also has demonstrated collision attacks. This is why SHA-256 or SHA-512 should be used for any security-critical checksum verification.
When should I use SHA-256 versus SHA-512?
Both SHA-256 and SHA-512 are considered cryptographically secure today. SHA-256 is the most widely deployed — it is the standard for TLS certificates, Bitcoin, JWT signatures, and most modern security protocols, making it the default recommendation. SHA-512 offers a larger output and can perform faster than SHA-256 on native 64-bit systems, making it preferable for very large file checksums or maximum collision resistance.