Hash Generator — SHA-1, SHA-256, SHA-512
Generate cryptographic hashes from any text using the Web Crypto API. All processing happens in your browser.
About Cryptographic Hashing
Cryptographic hash functions take an input of any size and produce a fixed-size output. They have three key properties: deterministic (same input = same output), irreversible (cannot recover input from hash), and collision-resistant (extremely hard to find two inputs with the same hash).
SHA-1 (160-bit) — legacy algorithm, no longer recommended for security. Still used for git commit hashes and non-security checksums.
SHA-256 (256-bit) — the most widely used secure hash. Used in Bitcoin, SSL certificates, and password hashing. Recommended for most applications.
SHA-384 (384-bit) — truncated version of SHA-512. Used in some TLS cipher suites.
SHA-512 (512-bit) — strongest SHA-2 variant. Used when maximum security is needed or on 64-bit systems where it can be faster than SHA-256.
Frequently Asked Questions
What is a hash?
A hash is a fixed-length string generated from input data using a mathematical algorithm. The same input always produces the same hash, but you cannot reverse a hash back to the original data. Hashes are used for password storage, data integrity verification, and digital signatures.
What is the difference between SHA-256 and SHA-512?
SHA-256 produces a 256-bit (64 character) hash while SHA-512 produces a 512-bit (128 character) hash. SHA-512 is more secure but slower. For most applications, SHA-256 provides sufficient security.
Is hashing the same as encryption?
No. Hashing is one-way — you cannot recover the original data from a hash. Encryption is two-way — you can decrypt data back to its original form with the correct key. Use hashing for passwords and integrity checks, encryption for data that needs to be read later.
Why is MD5 not listed?
MD5 is considered cryptographically broken and unsuitable for security purposes. Collisions (different inputs producing the same hash) have been demonstrated. We use the Web Crypto API which supports SHA family algorithms that are currently secure.
Can I verify file integrity with this?
Yes! If someone provides a SHA-256 hash of a file, you can paste the file contents here, generate the hash, and compare. If they match, the file has not been tampered with.
Related Tools
Base64 Encoder — Encode and decode Base64 strings.
JSON Formatter — Format and validate JSON data.