Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384 & SHA-512 hashes from text or files — entirely in your browser.

Hash Generator

Type or paste text below to instantly generate cryptographic hashes. All processing happens in your browser — nothing is sent to any server.

Select Algorithms:
Output Format:
Input Text:
0 characters · 0 bytes
Privacy: All hashing is done using the browser's native Web Crypto API (for SHA family) and a pure-JS MD5 implementation. Your text never leaves your device.

Paste two hashes to check if they match — useful for verifying downloaded file checksums.

Hash 1 (Expected)
Hash 2 (Actual)
Hash comparison is case-insensitive and ignores leading/trailing whitespace. Even a single character difference in the original file will produce a completely different hash.

What is a Hash Function?

A cryptographic hash function takes an input of any size and produces a fixed-size output (the "hash" or "digest"). The output is deterministic — the same input always produces the same hash — but even a tiny change in the input produces a completely different hash. This property, called the avalanche effect , makes hashes useful for verifying data integrity. Hash functions are one-way: it is computationally infeasible to reverse a hash back to its original input.

Hash Algorithm Comparison

Common Use Cases

Picking the Right Algorithm Isn't About "Strongest Wins"
These algorithms were designed for different jobs. Using SHA-512 where MD5 was intended doesn't make your system more secure — it just makes it slower and potentially incompatible.
AlgorithmOutput sizeDesigned forSecurity for signingStill used for
MD5128 bitsFast checksumsBroken (2004)Non-security checksums, cache keys, ETags, database deduplication, legacy protocol compliance
SHA-1160 bitsDigital signatures, SSLDeprecated (2017)Legacy git objects (migrating), old S/MIME, some API signature schemes that haven't updated
SHA-256256 bitsGeneral-purpose cryptographic hashStrongTLS, JWT, code signing, content-addressed storage, file integrity. The default choice for new work.
SHA-384384 bitsGovernment / compliance useStrongNSA Suite B, some compliance mandates. Computationally it's SHA-512 with a shorter output.
SHA-512512 bitsHigh-security / large dataStrongFaster than SHA-256 on 64-bit CPUs for large inputs; used in Argon2, some SSH key fingerprinting
When You Actually Need Each Algorithm
Real decisions, not theoretical ones.
Use MD5 when: fast dedup, not security

Generating cache keys from URL strings, deduplicating file uploads in a database, building ETags for HTTP caching. MD5 is fast, the output is short (32 hex chars), and the collision concern only matters if an attacker controls the input. If users aren't trying to craft collisions, MD5 is fine.

Never use MD5 or SHA-1 for: signatures, certificates, passwords

Wang and Yu published MD5 collision attacks in 2004. Real-world exploits followed: the Flame malware in 2012 used an MD5 collision to forge a Microsoft code-signing certificate. SHA-1 got its collision (SHAttered) in 2017. Both are now firmly off-limits for anything where an adversary can benefit from a collision.

Use SHA-256 for: almost everything else

TLS certificate signatures, JWT signatures (HS256/RS256), Docker content addressing, package integrity in npm/pip/Cargo, webhook signature verification, HMAC-SHA256 for API keys. If you're starting something new and someone asks "what hash should we use?", the answer is SHA-256 unless you have a specific reason otherwise.

Use SHA-512 for: 64-bit heavy lifting

On 64-bit hardware, SHA-512 is often faster than SHA-256 for large inputs because the internal block size is 1024 bits vs 512 bits — fewer rounds over the same data. If you're hashing gigabytes of data and want more collision margin, SHA-512 costs nothing extra on modern servers.

Run all algorithms simultaneously for migration

When switching an existing system from MD5 to SHA-256, store both hashes during the transition period. Mark records as "verified SHA-256" once they've been revalidated. This avoids a big-bang migration that requires reprocessing every stored hash at once.

File integrity vs tamper evidence — not the same thing

A checksum detects accidental corruption: bit rot, truncated downloads, flipped bytes during copy. It does not prove that a file hasn't been tampered with by someone who also updates the checksum. For tamper evidence, you need a digital signature (sign the hash with a private key) so that an attacker can't just recalculate and replace the checksum.

Related Tools
Other free security and hashing tools on IndexCraft.
Questions Worth Having Real Answers To
Each algorithm uses a completely different internal construction — different block sizes, different numbers of rounds, different mixing operations. The avalanche effect means that even a one-bit difference in input (or a different algorithm processing the same input) produces a completely different output. There is no mathematical relationship between, say, the MD5 and SHA-256 of the same string.
For large files, yes — reading the file once and feeding the data to multiple hash contexts simultaneously is much faster than reading it N times. Most languages let you update multiple hash objects in the same loop. Node's crypto.createHash(), Python's hashlib, and Go's hash package all support this pattern. This tool does exactly that when you compute multiple algorithms at once.
A collision is when two different inputs produce the same hash output. By the pigeonhole principle, collisions must exist for any hash function (infinite inputs, finite outputs). The question is whether they're practically findable. For MD5 and SHA-1, yes — researchers can craft collisions in minutes. For SHA-256, no known technique exists. The practical threat: if an attacker can produce two files with the same hash, they can get a certificate or signature for the benign file and use it to authenticate the malicious one.
It depends on what you're trying to secure and how. Adding a secret prefix ("secret key" + message) is vulnerable to length-extension attacks on Merkle-Damgård hashes (MD5, SHA-1, SHA-256). An attacker who knows the hash but not the key can append data and compute a valid hash for the extended message. The correct construction for keyed hashing is HMAC — it uses two nested passes that close off this attack. SHA-3 and BLAKE2 are not vulnerable to length extension and can be used with a key prefix safely.