probabilistic set · no false negatives · space-efficient

Bloom filter simulator

A Bloom filter is a space-efficient probabilistic data structure for set membership. It can tell you "definitely not in set" or "probably in set." No false negatives. Used in databases (LSM-trees), CDNs, web caching, and spell checkers.

Check if an item is in the set.
No items added yet.

How to use this tool

  1. Enter a value — a username, URL, or key — into the Add item to filter box and press Add. The bit grid lights up where the item's k hash functions land.
  2. Add a few more items and watch the stats line: it shows the item count, how many of the m bits are set, and the estimated false positive rate.
  3. To test membership, type any value into the Check membership box and press Check. The result tells you whether it's "not in the set", "in the set", or "probably in the set".
  4. Adjust Bits and Hash functions (k) to see how filter size and hash count change collisions and the false positive rate.
  5. Press Clear filter to reset all bits and start over.

Why this tool is helpful

Learn how Bloom filters work

See exactly which bits each hash sets and why membership is "probably" rather than "definitely" for untested items.

Understand false positives

Watch the estimated false positive rate climb as the fill rate rises, and tune m and k to keep it low.

Size a real filter

Experiment with bits vs. item count to find the optimal k = (m/n)·ln(2) before implementing one in Cassandra, HBase, or a CDN cache.

Reproduce a false positive

Walk the same hash-and-index logic your production filter uses to confirm why a lookup returned "maybe".

Teach probabilistic membership

A visual, zero-setup way to demonstrate the "no false negatives" guarantee to a teammate or student.

Stay private

Everything runs locally in your browser. Nothing is uploaded, logged, or sent to a server.

FAQ

What is a Bloom filter?

A space-efficient probabilistic data structure for set membership. Using a bit array and k hash functions, it answers "definitely not in the set" or "probably in the set" without storing the items themselves.

What's a false positive, and can a Bloom filter have false negatives?

A false positive means the filter says "probably in the set" for an item that was never added. A false negative — saying "not in the set" for an item that was added — is impossible: Bloom filters guarantee no false negatives.

Why does Check sometimes say "PROBABLY in the set (false positive)"?

It means all k bits for that item were already set by other items. The percentage shown is the estimated probability of that collision.

What do Bits and Hash functions (k) control?

Bits is the size m of the bit array — more bits lower the false positive rate. k is the number of hash functions; too many can saturate the bits and backfire.

Can I remove an item from the filter?

No. A standard Bloom filter doesn't support deletion, because clearing a bit could affect other items. Use Clear filter to reset everything; deletion requires a counting Bloom filter.

How is the false positive rate calculated?

It's estimated as p ≈ (1 - e^(-kn/m))^k, where n is the number of added items. The stats line and the footer both use this formula.

Does any of my data leave my browser?

Never. All hashing and rendering happen locally in JavaScript. Your input is not sent to, stored on, or logged by any server.