Hash Generator
Generate cryptographic hashes of any text using modern or legacy algorithms. Uses the browser's native Web Crypto API — your input never leaves your device.
How it works
A cryptographic hash function takes any input and produces a fixed-length output called a digest. The same input always produces the same digest. Changing even a single character produces a completely different digest — this is called the avalanche effect.
SHA-256 produces a 256-bit (32-byte) digest. SHA-512 produces a 512-bit (64-byte) digest. This tool uses the browser's SubtleCrypto API — no server computation required.
Hash vs encryption
Hashing is not encryption. A hash is one-way — you cannot reverse a hash to get the original input. Encryption is two-way: you can decrypt a ciphertext back to plaintext with the right key.
- Use hashing for: passwords, checksums, data integrity, digital signatures, deduplication
- Use encryption for: transmitting or storing data you need to recover later
Common uses
- File checksums — verify a downloaded file hasn't been tampered with by comparing SHA-256 hashes
- API request signing — HMAC-SHA256 signs API requests in AWS Signature v4, Stripe webhooks, and GitHub webhooks
- Password storage — store bcrypt/Argon2 hashes of passwords, never plaintext (SHA-256 alone is not sufficient for passwords without a salt and slow hash)
- Content-addressed storage — Git uses SHA-1 (and is migrating to SHA-256) to identify objects by their content hash
- Deduplication — detect duplicate files or records without comparing full content
🔒 Privacy
Hashing runs in your browser using window.crypto.subtle. Your input is never sent to any server.
FAQ
Why is MD5 not included?
MD5 is cryptographically broken — practical collision attacks exist where two different inputs produce the same hash. It should not be used for any security purpose. SHA-1 is also broken for collisions but included for legacy compatibility. Use SHA-256 or SHA-512 for new work.
What is the hash of an empty string?
SHA-256 of an empty string is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. This is deterministic and useful for testing your hashing implementation.