SimHash explained in plain terms means understanding the fingerprint that knows when two documents are nearly the same, a technique from 2002 that turns any page into a 64-bit value where similar pages get similar values. The central question is why a hash would want similar inputs to give similar outputs when every other hash does the opposite, and the answer is that search engines need to spot copies without comparing every page with every other page, so SimHash gives crawlers a shortcut, and that shortcut is the whole point of the design.
SimHash is a locality-sensitive hash created by Moses Charikar, presented in his 2002 paper on similarity estimation from rounding algorithms. It turns a document into a fingerprint by hashing each feature and adding the results with weights, and it is built on the idea that a hash should preserve closeness, which means the design is meant for finding near-duplicates above all, and that focus is what makes it unlike the hashes of its era.
This article sets out five facts that explain what SimHash is, how it works, and where it runs in the real world.
Key takeaways
- SimHash is a fingerprint from 2002, by Moses Charikar.
- Similar documents get similar fingerprints.
- It compares fingerprints with Hamming distance.
- Google used it to spot near-duplicate pages.
- It works on 64-bit fingerprints in most deployments.
What SimHash is
SimHash is a hash that turns a document into a 64-bit fingerprint with one unusual promise, and that promise is what makes it unusual among hashes. Each feature of the document is hashed and weighted, which means the fingerprint reflects the whole document, and because common features weigh more, the result stays stable when a page changes slightly.
Its signature feature is the Hamming distance. Most hashes tell you only whether two inputs are identical, but SimHash lets you count the bits that differ, which means two fingerprints a few bits apart belong to near-duplicates, and because the distance is cheap to compute, a crawler can compare fingerprints instead of pages.
The design was a reaction to the scale of the web. Search engines crawl billions of pages, so Charikar asked how a crawler could spot copies without comparing every pair, because comparing every pair is far too slow, and that practicality is what made SimHash worth publishing.
It became one of the best-known similarity hashes in the world, and it is named in every discussion of the field. Google validated it on eight billion pages with 64-bit fingerprints and a distance of three, it is still the first example engineers meet when they learn that a hash can measure closeness, which means the design survives as a tool even though it is more than twenty years old.
Our guide to MurmurHash explains the fast hash often used to hash SimHash features, and our guide to hashing explains the wider family it belongs to.
How SimHash works
Everything starts with the features, which are the words and phrases of the document. SimHash breaks a page into shingles, which means each feature is a small slice of text, and because the slices overlap, a small edit changes only a few of them.
Each step begins with a feature hash, which turns one slice into bits. SimHash hashes every feature with an ordinary hash, which means each slice becomes a 64-bit pattern, and because the hash is fixed, the same slice always gives the same pattern.
The weighting is what makes the design work as a whole. SimHash adds the feature hashes together with weights, turning each bit on or off by majority vote, which means important features count more, and because the vote is per bit, the fingerprint keeps the shape of the document.
The fingerprint spreads the effect further. The final 64-bit value is the sum of all the weighted votes, which means each bit reflects many features, and because the sum is rounded, a single changed feature rarely flips a bit.
The comparison is what turns fingerprints into answers. SimHash compares two fingerprints by xoring them and counting the ones, which means the Hamming distance is one cheap operation, and because the threshold is small, near-duplicates are found fast.
The result comes from the distance, read out as a number of differing bits. SimHash treats fingerprints within three bits as near-duplicates, which means the answer is a yes or no whatever the documents, and that answer is exactly what a crawler needs to skip a copy.

Comparing SimHash with other similarity hashes
SimHash is one of several similarity hashes built for finding copies, and each was built with a different emphasis. MinHash is the set-based hash that estimates Jaccard similarity, Nilsimsa is the digest built for spam and files, and SimHash is the one built on Hamming distance for documents, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | SimHash | MinHash | Nilsimsa |
|---|---|---|---|
| Output size | 64 bits | Variable | 256 bits |
| Similarity | Cosine | Jaccard | Text similarity |
| Distance | Hamming | Jaccard estimate | Digest compare |
| Designed for | Web pages | Sets | Spam and files |
| Best for | Near-duplicates | Set overlap | Fuzzy matching |
The practical result is that SimHash is the right choice for near-duplicates, MinHash suits set overlap, and Nilsimsa fits fuzzy matching instead.
Where SimHash is used
Web crawling uses it to skip copies. Google’s crawler fingerprints every page it fetches, because a page that matches one already indexed can be ignored, and that shortcut is the reason SimHash earns its keep in search infrastructure.
Spam detection uses it to catch near-copies. A spam filter that sees a message close to a known spam can block it, because spammers tweak a few words to dodge exact matches, and that tweak is the reason SimHash appears in filters.
Plagiarism checking uses it to find borrowed text. A checker that fingerprints student work can spot passages lifted from elsewhere, because a copied paragraph keeps most of its features, and that stability is the reason SimHash appears in checking tools.
News clustering uses it to group the same story. Aggregators fingerprint incoming articles and cluster the near-duplicates, because the same story appears in many outlets, and that clustering is the reason SimHash runs in news pipelines.
Teaching uses it as the similarity example. Courses introduce SimHash when they explain that a hash can preserve distance, because it is the clearest case of the idea in a real design, and a student who understands SimHash understands why locality-sensitive hashing matters.
Strengths and limits
The greatest strength of SimHash is its scale. A fingerprint that lets a crawler compare pages by xoring 64-bit values gives search engines duplicate detection for billions of pages, and that strength is real, measured in Google’s own eight-billion-page test and confirmed by the systems that still use it.
It is also a strength that the design is simple to explain. A weighted vote per bit is a design anyone can describe, and that simplicity is worth more than cleverness in a field where a hash nobody can audit is a hash nobody trusts.
The limits are real, though, and the biggest is the threshold. SimHash needs a tuned distance cut-off, which means a threshold that is too loose merges different pages and one that is too tight misses copies, and a system that needs exact answers must compare the documents themselves instead.
SimHash checklist
- Use SimHash for near-duplicate detection, never for security or passwords.
- Remember it outputs a 64-bit fingerprint from weighted votes.
- Note the Hamming distance is the comparison that matters.
- Compare it with MinHash to see two kinds of similarity hash.
- Study the weighting, which is what keeps fingerprints stable.
- Check the threshold, since three bits is the usual cut-off.
- Keep real secrets behind cryptographic hashes.
- Read Charikar’s paper to see how the rounding was built.
- Choose exact comparison when near-duplicate is not enough.
Frequently asked questions
What is SimHash in simple terms?
It is a 2002 fingerprint that turns a document into 64 bits, so similar documents get fingerprints that differ in only a few bits.
Who created SimHash?
Moses Charikar, who presented it in his 2002 paper on similarity estimation from rounding algorithms.
How is SimHash different from MinHash?
Both find similar items, but SimHash estimates cosine similarity with Hamming distance while MinHash estimates Jaccard similarity between sets.
Is SimHash still secure?
It is fast and well studied, but it is a similarity hash, not a cryptographic one, so it must never guard secrets or signatures.
Where is SimHash used?
In web crawling, in spam detection, in plagiarism checking, in news clustering, and in teaching about similarity hashing.
When should I use SimHash?
When you need to spot near-duplicate documents at scale, when you cluster similar text, or when you study locality-sensitive hashing.
The bottom line
SimHash explained in one line is this: the fingerprint that measures closeness, a 2002 design of weighted votes and Hamming distance that let search engines spot copies and taught the field that a hash can preserve similarity.
It is proof that a hash need not avalanche to be useful, and the reason it still matters is that every similarity hash designed since has been judged partly by the lesson SimHash taught.
This article is general information about how SimHash works, not advice about choosing encryption for a particular device or system.







