Back to Playground
Bloom Filter
A space-efficient probabilistic data structure for set membership queries. It can tell you if an element is definitely NOT in a set, or PROBABLY in a set.
Insert Item
Query Item
Try:
Bit Array (32 bits)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Set (1)
Unset (0)
Just hashed
Inserted Items (0)
No items inserted yet
Statistics
Fill Rate0.0%
Est. False Positive Rate~0.0%
Total Queries0
False Positives0
How Bloom Filters Work
Insert
Hash the item with k hash functions. Set those k bit positions to 1.
Query
Hash and check k positions. If ANY is 0 → definitely not in set. If ALL are 1 → probably in set.
Trade-off
Space-efficient but allows false positives. No false negatives. Cannot delete items.