Hash Function Explorer
Type any text and watch a hash function process it character by character. Change a single bit and see the avalanche effect cascade through every output bit. A hash function’s job is to make small input changes produce large, unpredictable output changes.
Two inputs that differ by one character. Red bits show where the outputs differ.
Generate random inputs and look for hash collisions — different inputs that produce the same hash. With a 32-bit hash, the birthday paradox predicts collisions after about 65,536 random inputs.
What makes a good hash?
A hash function maps arbitrary input to a fixed-size output. A good hash function has three properties: it’s fast, it distributes outputs uniformly, and it exhibits the avalanche effect — changing one input bit should flip approximately half the output bits.
FNV-1a (Fowler-Noll-Vo) works by XORing each byte with the hash, then multiplying by a large prime. DJB2 uses a simpler shift-and-add scheme. Jenkins mixes more aggressively with shifts, additions, and XORs. None of these are cryptographic — they’re designed for speed in hash tables, not security. But they demonstrate the core principles that SHA-256 and BLAKE3 take to extremes.
The collision finder demonstrates the birthday paradox: with a 32-bit hash, you only need about 216 (~65,000) random inputs before a collision becomes likely. For a 256-bit hash, you’d need about 2128 — more than the number of atoms in the observable universe.