MurmurHash explained in plain terms means understanding the hash that powered a generation of databases and then taught the whole web a hard lesson about collisions, a design from 2008 that was fast, simple and everywhere, until attackers learned to game it. The central question is how a hash with no security at all became the backbone of serious infrastructure, and the answer is that for years nobody attacked hash tables, so speed was all that mattered, and when that changed, MurmurHash became the cautionary tale that pushed the industry toward keyed hashes, which is a story worth knowing.
MurmurHash is a non-cryptographic hash function created by Austin Appleby and first released in 2008. It turns a message of any length into a 32-bit, 64-bit or 128-bit fingerprint, and it is built from a short sequence of multiplications, rotations and exclusive-ors, which means the design does very little per byte, and that leanness is what made it one of the fastest hashes of its era.
This article makes the case for MurmurHash, explains what it is, how it works, and where its ideas still earn their keep.
Key takeaways
- MurmurHash is a non-cryptographic hash from 2008.
- It was created by Austin Appleby for speed.
- It produces 32-bit, 64-bit and 128-bit fingerprints.
- Its name comes from multiply and rotate.
- It is used in databases and in hash-table history today.
What MurmurHash is
MurmurHash is a hash that turns a key into a short fingerprint, and that fingerprint is what decides where a key lands in a hash table or a database partition. A program feeds in a string, MurmurHash mixes it with multiplications and rotations, and out comes a number, which means two different strings should land in different buckets, and that promise is what keeps a hash table fast.
Its signature feature is the name itself. Murmur comes from multiply and rotate, the two operations at the heart of the design, which means the hash wears its method in its name, and because the method is so plain, the design is easy to explain in a single sentence.
The design was a reaction to the hashes of its day. In 2008, the popular hashes were either slow cryptographic ones or fast ones with poor distribution, so Appleby built a hash that was both fast and well distributed, because a hash table is only fast when its buckets are evenly filled, and that balance is what made MurmurHash catch on.
It became one of the best-known hashes in the world, and it is named in every history of database engineering. Apache Cassandra adopted it as its default partitioner, libraries in every language shipped it, and it became the standard answer to fast hashing, which means the design went from a personal project to infrastructure in a few years, and that adoption is the reason it is now a landmark.
Its most famous property is the lesson it taught. In 2011, researchers showed that attackers could craft strings that all collided under MurmurHash, flooding hash tables and slowing servers to a crawl, which means the hash became the textbook example of hash flooding, and that lesson is the reason languages switched to keyed hashes like SipHash.
Our guide to hashing explains the fingerprint idea that MurmurHash is built on, and our guide to SipHash explains the keyed hash that replaced it in language runtimes.
How MurmurHash works
Everything starts with the seed, a number the caller supplies to vary the output. MurmurHash mixes the seed into its initial state, which means the same input can produce different fingerprints under different seeds, and because the seed is just a starting value, the design needs no secret key at all.
Each block begins with the input, which is read in chunks of four or eight bytes. The chunk is multiplied by a large constant, rotated, and multiplied again, which means every byte is stirred into the state quickly, and because the operations are so cheap, the design processes data at a pace close to memory speed.
The finalisation is what makes the design work as a whole. After the last chunk, MurmurHash runs the state through a series of xor-shifts and multiplications that spread every bit across the whole fingerprint, which means a single changed byte produces a completely different output, and because the finalisation is thorough, similar inputs never produce similar fingerprints.
The constants spread the effect further. MurmurHash uses a handful of odd constants chosen for their mixing properties, which means the multiplication has no obvious pattern, and because the constants are fixed and public, anyone can study exactly what the hash does.
The tail handling is what keeps the design fast on short inputs. Messages that do not fill a whole chunk are processed byte by byte with the same multiply-and-rotate steps, which means even a tiny string gets the full treatment, and because the tail code is short, the design stays fast on the small keys that hash tables see most.
The fingerprint comes from the final state, read out as a 32-bit, 64-bit or 128-bit number. MurmurHash outputs the mixed state directly, which means the result fits in one or two machine words, and that size is exactly what a hash table or a database partitioner needs.

Comparing MurmurHash with other fast hashes
MurmurHash is one of several fast hashes used in software, and each was built with a different emphasis. xxHash is the newer speed champion with 32-bit and 64-bit outputs, CityHash is the Google hash built for short strings, and MurmurHash is the one that became the database standard with 128-bit outputs, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | MurmurHash | xxHash | CityHash |
|---|---|---|---|
| Output sizes | 32, 64 or 128 bits | 32 or 64 bits | 64 or 128 bits |
| Security | None | None | None |
| Year | 2008 | 2012 | 2011 |
| Designed for | General hashing | Maximum speed | Short strings |
| Best for | Database partitions | Checksums | String hashing |
The practical result is that MurmurHash is the right choice for database partitions, xxHash suits checksums, and CityHash fits string hashing instead.
Where MurmurHash is used
Cassandra uses it to partition data. Apache Cassandra hashes every row key with MurmurHash3 to decide which node stores the row, because a distributed database needs an even spread across its nodes, which means the hash quietly decides where petabytes of data live.
Libraries use it as the default fast hash. Programming libraries in many languages shipped MurmurHash as their general-purpose hash, because it was fast, well distributed and easy to port, and that ubiquity is the reason so many systems still carry it today.
Search engines use it to fingerprint documents. Indexing pipelines hash documents with MurmurHash to detect duplicates and to spread work across machines, because a fast hash keeps the pipeline moving, and that speed is the reason it became a standard tool.
Teaching uses it as the HashDoS example. Cryptography and security courses introduce MurmurHash when they explain hash-flooding attacks, because it is the clearest case of a fast hash being gamed, and a student who understands MurmurHash understands why keyed hashes exist at all.
History uses it to tell the story of 2011. The hash-flooding revelations changed how every language built its hash tables, and MurmurHash is remembered wherever that story is told, which means it survives as history as well as a working tool.
Strengths and limits
The greatest strength of MurmurHash is its distribution. A hash that spreads keys evenly across buckets keeps hash tables fast, and that evenness is real, measured in the benchmarks that praised it and confirmed by the databases that still depend on it.
It is also a strength that the design is tiny. A hash built from a few multiplications and rotations is easy to implement, easy to audit and easy to port, and that simplicity is worth more than cleverness in a field where a hash nobody can implement quickly is a hash nobody adopts.
The limits are real, though, and the biggest is that it is predictable. An attacker who knows the seed can craft colliding inputs, which means MurmurHash must never be used where an adversary controls the keys, and its value today is in databases and in the lesson it taught.
MurmurHash checklist
- Use MurmurHash for partitions and checksums, never for security.
- Remember it was created by Austin Appleby in 2008.
- Pick the 32-bit, 64-bit or 128-bit variant to fit the job.
- Compare it with xxHash to see the speed trade-off.
- Note MurmurHash3 is the version most systems use.
- Seed it when you need different fingerprints per run.
- Never use it where an attacker controls the input.
- Check your database already uses it for partitioning.
- Choose a keyed hash for any hash table an attacker can touch.
Frequently asked questions
What is MurmurHash in simple terms?
It is a very fast non-cryptographic hash from 2008 that turns any data into a short fingerprint, built for hash tables and database partitions rather than security.
Who created MurmurHash?
Austin Appleby, who released it in 2008 and later published MurmurHash3 in 2011, the version most systems use today.
How is MurmurHash different from xxHash?
Both are fast non-cryptographic hashes, but MurmurHash offers a 128-bit output and became the database standard, while xxHash is newer and faster on modern hardware.
Is MurmurHash still secure?
No, it was never meant to be secure, and researchers showed in 2011 that colliding inputs can be crafted easily, so it is only safe where no adversary controls the input.
Where is MurmurHash used?
In Apache Cassandra, in programming libraries, and in search engines, wherever a fast, well-distributed fingerprint is needed.
When should I use MurmurHash?
When you partition data, when you fingerprint documents, or when you want the hash that taught the web about flooding.
The bottom line
MurmurHash explained in one line is this: the hash that built the database era, a 2008 design from Austin Appleby that spread keys beautifully and then taught the web why predictable hashes are dangerous.
It is proof that a good tool can still teach a hard lesson, and the reason it still matters is that every hash table built since has been judged partly by the lesson MurmurHash taught.
This article is general information about how MurmurHash works, not advice about choosing encryption for a particular device or system.







