Hash Generator
Computes MD5, SHA-1, SHA-2, SHA-3 and BLAKE for any text — all at once, in real time.
—
—
—
—
—
—
—
—
—
—
—
—
Comparing the algorithms
| Algorithm | Security | Speed | Current status | Main use cases |
|---|---|---|---|---|
MD5 128 bits | Broken — collisions generated in seconds Collision resistance: None | Very fast | Not recommended | Non-adversarial checksums (accidental corruption), compatibility with legacy systems |
SHA-1 160 bits | Broken — real collision demonstrated (SHAttered, 2017) Collision resistance: Compromised | Fast | Legacy | Legacy systems in migration (e.g. Git's internal objects, with additional collision mitigation) |
SHA-2 (SHA-256 / SHA-512) 224 to 512 bits (SHA-256/SHA-512 most common) | Strong — no known practical attack Collision resistance: High | Fast (native acceleration on modern CPUs) | Recommended | TLS/HTTPS, digital signatures, integrity verification, Bitcoin |
SHA-3 (Keccak) 224 to 512 bits | Strong — internal construction different from SHA-2 (sponge) Collision resistance: High | Slower than SHA-2 in software | Recommended | Cryptographic diversification, systems avoiding reliance on a single algorithm family |
BLAKE2 Up to 256 bits (BLAKE2s) or 512 bits (BLAKE2b) | Strong — SHA-3-equivalent security level Collision resistance: High | Faster than MD5 and SHA-2 in software | Recommended | High-performance checksums, commit signing, speed-sensitive systems |
BLAKE3 256 bits (extendable) | Strong Collision resistance: High | Extremely fast — parallelizable (Merkle tree) | Recommended | Large-scale integrity verification, large files, modern build/backup tools |
What a hash function is and how it works
A hash function takes an input of any size — a single character, a paragraph, an entire file — and produces a fixed-size output called a hash, digest, or checksum. Internally, the algorithm processes the input in blocks, applying rounds of mathematical operations (bit shifting, XOR, substitution, compression) until everything is condensed into a final value of the size defined by the algorithm — 128 bits for MD5, 256 bits for SHA-256, for example. The result works as a fingerprint of the content: it identifies it in a practically unique way, without allowing the original input to be reconstructed from it.
One-way function: why a hash can't be reversed
"One-way" means computing the hash from the input is fast and trivial, but going the other way — recovering the input from the hash — is computationally infeasible. This isn't an implementation limitation: it's the algorithm's own design goal. Unlike a cipher, which exists precisely to be reversed with the right key, a hash function doesn't store the input at all, only a digest of it — there's no key, secret, or process that "decrypts" it. In practice, the only way to try to reverse a hash is to guess candidate inputs and recompute the hash of each one until finding a match (brute-force or dictionary attack) — infeasible once the input is long enough.
Hash, cryptography and encoding aren't the same thing
The three terms are often confused, but they solve different problems. Hash is one-way and keyless — it verifies integrity and content identity, never hides nor recovers the input. Cryptography (encryption) is two-way and depends on a key — it exists precisely so it can be reversed by whoever holds the right key (e.g. AES, RSA). Encoding (Base64, URL Encode) makes no claim to security at all — it's just a representation transformation for transport compatibility, trivially reversible by anyone, with no key whatsoever.
Determinism and the avalanche effect
Two properties make a hash reliable as a verification tool. Determinism guarantees that the same input, processed by the same algorithm, always produces exactly the same hash — without it, comparing two files or confirming a download wasn't corrupted would be impossible. The avalanche effect guarantees the opposite in the right direction: changing a single character in the input — even one extra space — flips, on average, half of the resulting hash's bits, producing a completely different value with no apparent relation to the original. That effect is what stops anyone from inferring anything about the input from similar-looking hashes, and what makes a hash sensitive enough to detect even the smallest accidental or deliberate change.
What a hash collision is
A collision happens when two different inputs produce exactly the same hash. Since the input can be of any size while the output always has a fixed size, collisions mathematically exist in every hash function — the space of possible inputs is infinite, the space of outputs isn't. What separates a secure algorithm from a broken one isn't the absence of collisions (impossible), but the computational cost of finding one on purpose: a good algorithm makes that search infeasible in practice. MD5 and SHA-1 no longer offer that guarantee — real collisions have already been demonstrated for both (MD5 since 2004, SHA-1 with the SHAttered attack in 2017) —, making them unsuitable for any scenario where someone malicious could forge a malicious file with the same hash as a legitimate one.
Choosing the right algorithm
MD5 (128 bits) and SHA-1 (160 bits) are fast and still show up in legacy systems, but their collision-resistance guarantees are broken — using them today only makes sense for non-adversarial checksums (accidental corruption, never deliberate attack) or compatibility with a system that can't be replaced. SHA-2 (SHA-256/SHA-512) is today's industry standard, with no known practical attack, and the right default choice for any new integrity or security need. SHA-3 uses an internal construction structurally different from SHA-2 (sponge, instead of Merkle–Damgård) — it isn't "better" security-wise today, but serves as an independent alternative when you want to diversify the algorithm in use. BLAKE2 delivers SHA-3-level security with performance superior to MD5 in software. BLAKE3, the newest of the family, goes further: it uses a Merkle tree internally, allowing the computation to be parallelized across multiple cores — today's fastest option for verifying integrity of large files. Rule of thumb: for any new security-relevant use, prefer SHA-256, SHA-3, or BLAKE3; never MD5 or SHA-1.
Real-world applications of hash functions
Integrity verification: download pages publish the SHA-256 hash of the official file so whoever downloaded it can confirm they received exactly that content. Comparison and deduplication: backup and storage systems compare hashes instead of comparing bytes one by one to decide whether two files are identical, keeping only one physical copy of duplicated content. Document fingerprinting: a hash works as a short signature of an entire document — any change alters the hash and exposes the difference. Digital signatures: for efficiency, the private key signs the document's hash, not the whole document. Versioning: Git identifies every commit, file, and directory tree by the hash of its own content (historically SHA-1, migrating to SHA-256) — two commits with the same content share the same identifier. Caching and CDNs: filenames using "cache busting" rely on the content's hash, making the cache expire on its own exactly when the file changes. Unique content identification: systems like IPFS address a file by its own hash instead of a path or URL. Blockchain: each block references the hash of the previous block, chaining the whole history together — altering an old block changes its hash and breaks the chain, making tampering detectable.
Hash is the wrong tool for passwords
MD5, SHA-1, and even SHA-256 were designed to be fast — and speed is exactly what an attacker wants when brute-forcing a password, since specialized hardware can compute billions of these hashes per second. Password storage requires the opposite: an algorithm deliberately slow and expensive to compute, so testing each guess costs real time and memory. The correct algorithms for that are Argon2id (winner of the Password Hashing Competition, OWASP's current first-choice recommendation), bcrypt (decades of proven use, with an adjustable cost factor), and scrypt (requires memory in addition to time, making an attack on dedicated hardware even more expensive). Never use MD5, SHA-1, or SHA-256 directly to store a password — none of the three was designed for that purpose, even though all three are perfectly secure for the uses they're actually meant for (integrity, checksums).
Frequently asked questions
It's the result of applying a hash function to an input: a fixed-size sequence (32 hexadecimal characters for MD5, 64 for SHA-256) that works as a fingerprint of that specific content.
To verify content integrity and identity without storing or transmitting the whole content — comparing files, detecting corruption, identifying duplicates, or uniquely referencing an object (Git, blockchain), among the other uses described above.
Hash is one-way and keyless — there's never a process to get back to the original input. Cryptography is two-way and depends on a key — it's designed precisely to be reversed (decrypted) by whoever holds the right key.
Encoding (Base64, URL Encode) is a representation transformation, trivially reversible by anyone with no key at all — it exists only for transport compatibility. Hash has no such goal: it's one-way by design, not a way to "store" the input for later recovery.
No, by design. The only way to find an input that produces a specific hash is to test candidate inputs and recompute the hash of each — brute-force or dictionary attack —, infeasible once the input is long enough.
Yes, always — as long as the same algorithm is used. Determinism is a mandatory property of any hash function; without it, using it for comparison or verification would be impossible.
Yes — that's the avalanche effect: changing even a single character in the input flips, on average, half of the resulting hash's bits, producing a completely different value with no apparent relation to the original.
For any new security-relevant use, SHA-256 (SHA-2) is the safest default choice; BLAKE3 is the fastest alternative at the same security level. Never choose MD5 or SHA-1 for a new use case.
Only for non-adversarial checksums — detecting accidental file corruption, for example —, never for any scenario where someone could deliberately forge a malicious file with the same hash as a legitimate one.
Not for cryptographic use. A real collision was publicly demonstrated in 2017 (the SHAttered attack); NIST has recommended replacing it since 2011. It still appears in legacy systems in transition, such as Git's internal objects.
Both produce 256 bits and are considered secure today, but use different internal constructions — SHA-256 (SHA-2 family) uses Merkle–Damgård, SHA3-256 uses a sponge construction. They aren't versions of each other; they're distinct families with the same output size.
It's the newest algorithm in the BLAKE family (2020), optimized for maximum speed: it uses a Merkle tree internally, which allows the computation to be parallelized across multiple CPU cores — today's fastest option for verifying the integrity of large files.
Not with a generic hash (MD5, SHA-1, SHA-256) used directly — all three were designed to be fast, which favors the attacker. Use an algorithm designed specifically for passwords: Argon2id, bcrypt, or scrypt, deliberately slow and expensive to compute.
Compute the hash (usually SHA-256) of the received file and compare it to the hash published by the official source. If the two values match, the file wasn't altered or corrupted along the way; any difference indicates a file different from the original.
Two different inputs end up with the same hash, breaking the assumption that a hash uniquely identifies a piece of content. On broken algorithms (MD5, SHA-1), that allows forging a malicious file with the same hash as a legitimate one, compromising any integrity check based on that algorithm.
Not in an absolute sense — collisions mathematically exist in every hash function, since the output has a fixed size and the input doesn't. "Secure" means finding a collision on purpose is computationally infeasible with current technology, not that collisions don't exist. SHA-256, SHA-3, and BLAKE3 meet that bar today.
Yes — it's one of the most common uses. If two files' hashes match (using an unbroken algorithm), the files are, for practical purposes, identical; it's far faster than comparing the files byte by byte.
Because of the avalanche effect combined with the size of the output space: any difference between two files already produces completely distinct hashes, and the number of possible hashes (2²⁵⁶ for SHA-256, for example) is large enough that an accidental collision is astronomically unlikely.