Hash Generator
Calculate MD5, SHA-1, SHA-256, SHA-512 hashes
About Hash Generator
A cryptographic hash function takes an arbitrary-length input and produces a fixed-length digest. This tool computes MD5, SHA-1, SHA-256, SHA-512 and related digests entirely in the browser — your text never leaves your machine. Common uses include verifying file integrity against published checksums, generating HTTP ETags, and producing content-addressed identifiers for cache busting.
Common Use Cases
Frequently Asked Questions
Can I use MD5 or SHA-1 for password storage?
No — and this is critical. MD5 and SHA-1 are broken for collision resistance and are far too fast for password hashing; an attacker with a GPU can try billions per second. Always use a slow, salted password-hashing algorithm: bcrypt, scrypt, or Argon2. Never store passwords with a generic hash function, regardless of whether you add a salt.
What is the difference between hashing and encryption?
Hashing is one-way: given the digest you cannot recover the original input (without brute force). Encryption is reversible: with the correct key you can decrypt ciphertext back to plaintext. Use hashing for integrity and identity; use encryption when you need to retrieve the original data.
Why add a salt, and how?
A salt is a random value prepended or appended to the input before hashing. It ensures two users with the same password produce different digests, defeating precomputed rainbow-table attacks. Password-hashing libraries (bcrypt, Argon2) handle salt generation and storage automatically — do not implement this yourself.
When should I use HMAC instead of a plain hash?
When you need to verify both the integrity and the authenticity of a message and both parties share a secret key. HMAC mixes the key into the hash so an attacker who does not know the key cannot forge a valid digest. Use HMAC for API request signing, webhook verification, and cookie integrity.
SHA-256 or SHA-3?
SHA-256 (part of the SHA-2 family) is the pragmatic choice: widely supported, hardware-accelerated on most CPUs, and not known to be broken. SHA-3 uses a different mathematical construction (Keccak sponge) and is a good hedge if SHA-2 were ever broken, but in practice either is fine for integrity checks.