MurmurHash3 Calculator

Compute the MurmurHash3 32-bit hash for hash tables

Computes the MurmurHash3 32-bit (x86) hash of any text with a configurable seed, returning hex and decimal output. The same well-distributed hash used by many databases, hash tables and bloom filters. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is MurmurHash3?

MurmurHash3 is a fast non-cryptographic hash by Austin Appleby, designed for excellent distribution and speed. The 32-bit variant computed here is widely used in hash tables, bloom filters and sharding.

MurmurHash3 is a fast, high-quality non-cryptographic hash function designed by Austin Appleby, used throughout databases, caches, and probabilistic data structures. This calculator implements the 32-bit x86 variant (MurmurHash3_x86_32) with a configurable seed, computing everything locally in the browser.

How MurmurHash3 works

The algorithm processes the input in 4-byte little-endian blocks, applies a finalisation avalanche, then produces a 32-bit result:

Initialise:

h1 = seed
c1 = 0xcc9e2d51
c2 = 0x1b873593

Body (each 4-byte block k):

k  = k * c1 (mod 2^32)
k  = rotl32(k, 15)
k  = k * c2 (mod 2^32)
h1 = h1 XOR k
h1 = rotl32(h1, 13)
h1 = h1 * 5 + 0xe6546b64

Tail (1–3 remaining bytes): Mix remaining bytes through the same c1/rotate/c2 pipeline and XOR into h1.

Finalise:

h1 = h1 XOR length
h1 = fmix32(h1)   // avalanche: shifts, XORs, and multiplications

The constants 0xcc9e2d51 and 0x1b873593 were selected empirically to maximise avalanche efficiency, and fmix32 ensures every output bit depends on every input bit even for very short inputs.

Reference values

InputSeedHexDecimal
(empty)00x000000000
hello00x248bfa47613153351
hello420xcedc2d7c3470532988
MurmurHash300x9bfa90042616860676

The empty string always returns 0 with seed 0 because the body loop never runs and the finalisation of length 0 avalanches 0.

The role of the seed

The seed initialises h1, so the same input produces a completely different hash for each seed value. This property makes MurmurHash3 useful for:

  • Bloom filters — use multiple independent seeds to produce independent hash functions for the same key.
  • Sharding — assign different seeds to replicas so the same key maps to different buckets in each.
  • Randomised hash tables — choose a random seed at startup to defeat hash-flooding attacks (though SipHash is more suitable if adversarial input is a real concern).

Why MurmurHash3 — and where it is actually used

MurmurHash3 was designed specifically to outperform FNV and djb2 in avalanche quality and speed while remaining simple to implement. Real-world users include:

  • Apache Cassandra — uses MurmurHash3 as its default partitioner for distributing rows across the ring.
  • Redis — cluster slot assignment uses a CRC-16, but several Redis modules and client libraries use Murmur for consistent hashing.
  • Elasticsearch / Lucene — uses MurmurHash3 in bloom filter implementations.
  • Protocol Buffers — some proto-related tooling uses Murmur for fingerprinting.
  • Python — the mmh3 package provides MurmurHash3 bindings and is widely used in data science pipelines.

Comparison with similar hashes

HashOutputNotes
djb232 bitsSimpler, slightly lower quality distribution
FNV-1a32 or 64 bitsOne byte at a time; no bulk lane processing
MurmurHash332 or 128 bits4-byte blocks; better avalanche than djb2/FNV
xxHash32/6432 or 64 bitsGenerally faster than Murmur; also has 128-bit variant

For new code, xxHash is often faster while matching or exceeding MurmurHash3’s distribution quality. Choose MurmurHash3 when you need to match the output of an existing system (Cassandra, LevelDB, etc.) that already uses it.