Skip to main content

Hash functions

Hash Collision Playground

See how different inputs can map to the same shortened hash bucket. Adjust the hash size and watch collisions become more or less likely.

Educational demo only

This playground intentionally truncates a toy hash so collisions are visible. It is not a cryptographic hash implementation.

Collision summary

The same full demo hash is shortened to a smaller bucket space so collisions are easier to observe.

Values

8

Buckets

256

Collision groups

0

Birthday chance

10.4%

Explanation

A collision happens when two different inputs land in the same hash bucket. This playground intentionally truncates a demo hash so collisions are easy to see.

Hash buckets

Buckets with more than one value are collisions.

Bucket 73

49

unique

grape

full: 78e8a349

Bucket 93

5D

unique

banana

full: e70f225d

Bucket 99

63

unique

hotel

full: 7e5d2f63

Bucket 124

7C

unique

echo

full: 83f1b77c

Bucket 166

A6

unique

foxtrot

full: ff2b6fa6

Bucket 174

AE

unique

carrot

full: a32e52ae

Bucket 182

B6

unique

delta

full: d2d1e9b6

Bucket 234

EA

unique

apple

full: c2d64aea

Value table

#ValueFull demo hashTruncated hashBucket
1applec2d64aeaEA234
2bananae70f225d5D93
3carrota32e52aeAE174
4deltad2d1e9b6B6182
5echo83f1b77c7C124
6foxtrotff2b6fa6A6166
7grape78e8a3494973
8hotel7e5d2f636399