Browser Labs

Collision & Birthday Demo

Compare MD5, SHA-1, and SHA-256 collision resistance and explore the Birthday Paradox.

$ collision demonstration Read the Collision Guide

Explore hash collisions and understand why some algorithms are cryptographically broken. See how different inputs can produce the same hash output.

Status: 🔴 Broken
Input 1
Hash:
-
Input 2
Hash:
-
Collision Analysis
-
Known Collision Examples
Understanding Hash Collisions
What is a Hash Collision?

A collision occurs when two different inputs produce the same hash output. This is a fundamental weakness in cryptographic hash functions.

Why Do Collisions Matter?

Collisions can be exploited to create fake documents, bypass security checks, or forge digital signatures. The goal is to make collisions computationally infeasible.

Algorithm Security Status:
  • 🔴 MD5: Broken - collisions found in 2004
  • 🟡 SHA-1: Weak - collisions found in 2017
  • 🟢 SHA-256: Secure - no collisions found
How to Test:
  • • Use the prefill buttons to try real collision examples
  • • Switch between algorithms to see security differences
  • • Try the known collision examples (MD5/SHA-1)
  • • Use the random collision finder to demonstrate birthday paradox
Random Collision Finder
Generate random inputs to demonstrate the birthday paradox and find potential collisions.
Attempts: 0
Unique hashes: 0
Collisions found: 0
Current hash: -
Collision probability: -
Ready to start collision finding

Quick Collision Analysis

-
-
-
01
Why This Matters & 30-Second Experiment
Tap to expand plain-English guide & CLI command
Why This Matters

A collision happens when two different inputs produce the exact same hash. Because of the Birthday Paradox, an n-bit hash offers 2^(n/2) collision resistance, and structural flaws broke MD5 and SHA-1 completely.

Try This 30-Second Experiment
  1. Explore why MD5 is unsafe for digital signatures and certificates.
  2. Test the Birthday Paradox calculator to see why collisions appear much sooner than naive intuition predicts.
  3. Compare SHA-256 against MD5 and SHA-1 to see why 2^128 collision work remains out of reach.
Check why Git & OpenSSL migrated away from MD5 / SHA-1
openssl dgst -sha256 README.md   # Recommended
02
Visual Diagram, Guide & History
Tap to expand visual architecture & references
How It Works Visually
"hello""hellp" (+1 bit)2cf24dba5fb0a30e...769a2c44d8e10b91...~50% of bits flipped