Hash Generator

Generate cryptographic hashes from text using SHA-2 algorithms.

Input
SHA-256 Hash

How It Works

A cryptographic hash function takes any input and produces a fixed-length fingerprint. The same input always produces the same hash; even a single character change produces a completely different output. This makes hashes useful for verifying data integrity, generating checksums, and storing passwords.

This tool uses the browser's built-in crypto.subtle.digest API, part of the Web Crypto standard. All three algorithms here belong to the SHA-2 family: SHA-256 produces a 256-bit (64 hex character) digest, SHA-384 produces 384 bits, and SHA-512 produces 512 bits. Longer digests provide more collision resistance.

MD5 and SHA-1 are intentionally excluded — both have known collision vulnerabilities and are no longer considered cryptographically secure. SHA-256 or higher is recommended for all new applications.

Frequently Asked Questions

What is a hash and what is it used for?

A cryptographic hash function produces a fixed-length fingerprint (digest) from any input. The same input always gives the same hash; any change in input gives a completely different hash. Uses: verifying file integrity, storing passwords safely, generating checksums, and digital signatures.

What is the difference between SHA-256, SHA-384, and SHA-512?

All three are in the SHA-2 family. SHA-256 produces a 256-bit (64 hex character) digest; SHA-384 produces 384 bits; SHA-512 produces 512 bits. Longer digests provide more collision resistance. SHA-256 is the most widely used; SHA-512 can be faster on 64-bit CPUs.

Why are MD5 and SHA-1 not included?

Both MD5 and SHA-1 have known collision vulnerabilities — it is computationally feasible to craft two different inputs that produce the same hash. They are no longer considered cryptographically secure for integrity checking or digital signatures.

Can I use a hash to store passwords?

Not raw SHA hashes — they are too fast, making brute-force attacks practical. For password storage, use a dedicated password hashing algorithm: bcrypt, scrypt, or Argon2. These are deliberately slow and include a salt to prevent rainbow table attacks.

How do I verify a file download using a hash?

The file provider publishes the expected hash (e.g., SHA-256: abc123...). After downloading, compute the hash of your file and compare. If they match, the file is intact and unmodified. Any difference means the file was corrupted or tampered with.