Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes from any text. Free, private, instant.
What Is a Cryptographic Hash?
A cryptographic hash function takes any input — a word, a file, a gigabyte of data — and produces a fixed-length string called a digest or hash. Three properties make cryptographic hashes useful: they are deterministic (same input always gives the same output), one-way (you cannot reverse-engineer the original from the hash), and exhibit the avalanche effect (changing even one character in the input changes roughly half the output bits). These properties make hashes ideal for verifying integrity without storing or transmitting the original data.
Hash Algorithm Comparison
| Algorithm | Output length | Security | Common use |
|---|---|---|---|
| MD5 | 128 bits (32 hex) | Weak (broken) | File checksums, legacy systems |
| SHA-1 | 160 bits (40 hex) | Weak (deprecated) | Git commit IDs, old TLS |
| SHA-256 | 256 bits (64 hex) | Strong | TLS certificates, code signing, Bitcoin |
| SHA-512 | 512 bits (128 hex) | Very strong | High-security applications, file integrity |
Common Use Cases for Hashing
- File integrity verification — download a file and compare its SHA-256 hash against the one published by the author to confirm no tampering occurred in transit.
- Password storage — services store a salted hash of your password, not the password itself. At login, they hash what you enter and compare — your actual password never touches the database.
- Digital signatures — the signer hashes a document and encrypts the hash with their private key. Recipients decrypt with the public key and verify the hash matches.
- Data deduplication — storage systems hash every chunk to detect identical blocks. Two files with the same hash are the same data, so only one copy is kept.
- Cache keys and ETags — web servers hash response bodies and send the hash as an ETag so browsers can ask "has this changed?" without re-downloading everything.
Hashing vs Encryption
Hashing is one-way — you cannot get the original text back from a hash. Encryption is two-way — the ciphertext can be decrypted with the correct key. Never store passwords using only a general-purpose hash like SHA-256 without a per-user salt; use a purpose-built password hashing function like bcrypt, Argon2 or PBKDF2 instead. These functions are intentionally slow and include the salt, making rainbow table and brute-force attacks dramatically harder.