#️⃣ Hash Generator
Compute cryptographic hashes of any text using the WebCrypto API. Supports SHA-1, SHA-256, and SHA-512 algorithms. Runs entirely in your browser.
⚠️ SHA-1 is cryptographically weak — use SHA-256+ for security.
How to Use the Hash Generator
The Hash Generator computes SHA-1, SHA-256, and SHA-512 cryptographic hashes of any text input, entirely in your browser using the Web Cryptography API. Type or paste your input text into the text area and click Generate Hashes. All three hash values appear instantly as hexadecimal strings. Click the Copy button next to any hash to copy it to your clipboard.
Cryptographic hashes are used to verify data integrity, store passwords securely (with a proper algorithm like bcrypt, not raw SHA), create digital fingerprints of files, and build hash-based message authentication codes (HMACs). For password storage, always use a dedicated password hashing function like bcrypt, scrypt, or Argon2 — not SHA-256. Use SHA-256 or SHA-512 for general data integrity checks, file checksums, and HMAC operations. SHA-1 is included for legacy compatibility only — it is considered cryptographically broken and should not be used in new security applications. All computation happens locally using the browser's built-in crypto.subtle API — your input text is never sent to a server.
Frequently Asked Questions
What is a cryptographic hash?
›
A cryptographic hash function takes input data of any size and produces a fixed-size output (the hash or digest). For SHA-256, the output is always 64 hexadecimal characters (256 bits). Good hash functions have three properties: determinism (same input always produces same output), the avalanche effect (changing even one character in the input completely changes the output), and one-way (it is computationally infeasible to reverse the hash to find the original input).
What is the difference between SHA-1, SHA-256, and SHA-512?
›
These are all members of the SHA (Secure Hash Algorithm) family. SHA-1 produces a 160-bit (40 hex characters) digest but is considered cryptographically broken since 2005 and should not be used for security. SHA-256 produces a 256-bit (64 hex characters) digest and is currently the most widely used secure hash algorithm. SHA-512 produces a 512-bit (128 hex characters) digest and is stronger, but slower on 32-bit systems.
Can a hash be reversed to recover the original text?
›
No — a hash is a one-way function. It is computationally infeasible to reverse a SHA-256 hash to find the input. However, common inputs like short passwords can be cracked using rainbow tables or brute force. This is why password storage should use memory-hard functions like bcrypt (which adds a salt and is deliberately slow) rather than raw SHA hashes.
How can I use SHA-256 to verify a file download?
›
When you download software, the website often provides a SHA-256 checksum. You compute the SHA-256 hash of your downloaded file and compare it to the provided checksum. If they match, the file has not been corrupted or tampered with in transit. This tool computes hashes of text, not files — for file hashing use the command-line tool shasum (macOS/Linux) or CertUtil (Windows).