GLOSSARY

What is a hash collision?

A hash collision is two different inputs with the same hash. Learn why collisions break MD5 and SHA-1 and why SHA-256 is safe.

A hash collision happens when two different inputs produce the same hash digest. Because a hash maps infinite inputs to a finite output, collisions must exist mathematically — the question is whether an attacker can find one on purpose.

Why collisions matter

A secure hash makes finding a collision computationally infeasible, so a digest reliably identifies its input — the basis of signatures and integrity checks. Once collisions become practical (as with MD5 and SHA-1), an attacker can craft a malicious file with the same hash as a trusted one, forging signatures.

The birthday problem

Collisions appear far sooner than intuition suggests: for an n-bit hash, a collision becomes likely after roughly 2^(n/2) attempts, not 2^n — the "birthday bound." That is why hash length matters and why 128-bit MD5 fell first. SHA-256’s 256 bits keep the birthday bound comfortably out of reach.

Try it now — free, no signup

Use the hash generator in your browser. Then, when you need it at scale with an API key and higher limits, grab the full Eveses API.

FAQ

Do all hash functions have collisions?›
Yes, mathematically — but a secure one makes finding them infeasible. Broken ones (MD5, SHA-1) let attackers craft collisions cheaply.
Is SHA-256 collision-resistant?›
Yes — no practical collision attack exists, which is why it is a current default.

Related