LSH · near-duplicate detection · set similarity

SimHash & MinHash demo

Locality-Sensitive Hashing — similar inputs produce similar hashes (unlike cryptographic hashes). SimHash for near-duplicate text detection (Google's original dedup). MinHash for estimating Jaccard set similarity. Pure JavaScript.

0 chars
0 chars
SimHash (64-bit fingerprint) & analysis
Enter text to compute SimHash and compare similarity.

How to use this tool

  1. Paste a document into Text A — its 64-bit SimHash fingerprint renders instantly in the output panel.
  2. Paste a second version into Text B (compare similarity) to compare the two.
  3. Read the Hamming distance value — 3 or fewer flipped bits out of 64 is flagged as a likely near-duplicate.
  4. Check the MinHash (Jaccard similarity) figure for the fraction of unique words the two texts share.
  5. Use Clear to reset both boxes and start a fresh comparison.

Why this tool is helpful

Deduplicate documents & web pages

SimHash is the fingerprint Google used to find near-duplicate pages during crawling — compare any two texts the same way.

Spot plagiarism & light edits

Reworded or lightly rewritten text hashes close to the original, so a low Hamming distance flags copies that aren't byte-identical.

Estimate set similarity at scale

MinHash approximates Jaccard similarity without storing full word sets — the same trick that powers large-scale dedup and search.

Cluster near-identical records

Use the fingerprint as a key to bucket mirrors, spam, or duplicate rows before running expensive exact matching.

Build LSH intuition

See firsthand how similar inputs produce similar hashes — the opposite of cryptographic hashes like SHA-256.

Stay private

All hashing and comparison runs in your browser. Nothing is uploaded, logged, or sent to a server.

FAQ

What's the difference between SimHash and MinHash?

SimHash maps a whole document to a fixed 64-bit fingerprint, where similar documents yield close fingerprints (low Hamming distance). MinHash estimates Jaccard similarity between the two texts' sets of unique words.

What Hamming distance counts as a near-duplicate?

A common rule of thumb is ≤ 3 flipped bits out of 64. This tool flags that threshold as "Likely near-duplicate".

How is the SimHash fingerprint computed?

The text is split into words, each word is hashed, and for every one of the 64 bit positions the tool adds or subtracts a weight. The sign of each total determines that bit of the fingerprint.

Why do lightly edited texts still look similar?

SimHash weights individual word occurrences, so a small edit changes only a few tokens and flips only a few of the 64 bits.

What does the Jaccard similarity number mean?

It's |A∩B| / |A∪B|: shared unique words over total unique words. 1.0 means identical word sets and 0.0 means no shared words.

Is this like a cryptographic hash (SHA-256)?

No. A cryptographic hash is designed so similar inputs hash far apart, while locality-sensitive hashing maps similar inputs close together.

Does any of my data leave my browser?

Never. All computation runs locally in JavaScript. Your input is not sent to, stored on, or logged by any server.