Xerobit

MurmurHash Generator: MurmurHash3 32-bit and 128-bit

Enter text and a seed to compute MurmurHash3 32-bit and 128-bit x64 hashes instantly. MurmurHash is a fast non-cryptographic hash function widely used in hash tables, bloom filters and data partitioning. Everything runs locally in your browser without uploading any data.

Result

  • MurmurHash3 32-bit
    00000000
  • MurmurHash3 128-bit x64
    00000000000000000000000000000000
  • Input length
    0 bytes
  • Seed
    0

How to use the murmurhash generator

  1. Type or paste your text into the Text to hash field.
  2. Set the Seed value (an integer between 0 and 4294967295). The default is 0.
  3. The MurmurHash3 32-bit and 128-bit x64 results update automatically as you type.
  4. Copy the hexadecimal hash values for use in your application.

How MurmurHash3 works

MurmurHash3 processes input in 4-byte blocks for the 32-bit variant and 16-byte blocks for the 128-bit x64 variant. Each block is multiplied by a constant, rotated, XORed into an accumulator and multiplied again. After all full blocks are consumed, the remaining tail bytes are processed similarly. Finally, a mixing step called fmix ensures avalanche properties so that changing a single input bit flips roughly half of the output bits.

The 32-bit version uses two constants: c1 = 0xcc9e2d51 and c2 = 0x1b873593. The 128-bit x64 version uses c1 = 0x87c37b91114253d5 and c2 = 0x4cf5ad432745937f. Because JavaScript bitwise operators work on signed 32-bit integers, the implementation must carefully handle unsigned overflow using techniques like splitting 32-bit multiplications into 16-bit halves.

Verification vectors

These MurmurHash3 32-bit reference values come from the SMHasher test suite and cover the empty string and the largest seed.

InputSeedMurmurHash3 32-bit
(empty)000000000
(empty)1514e28b7
(empty)429496729581f16f39

For the 128-bit x64 variant with seed 0, the empty string gives 00000000000000000000000000000000 and "The quick brown fox jumps over the lazy dog" gives e34bbc7bbc071b6c7a433ca9c49a9347. The 128-bit result is printed as h1 followed by h2, each as 16 big-endian hex digits, which is the order most JavaScript libraries use. Libraries that return raw bytes show each half byte-swapped.

When to use MurmurHash

MurmurHash is designed for speed and excellent distribution, not security. It is commonly used in hash tables, database sharding, bloom filters, consistent hashing rings and checksums for internal data pipelines. Systems such as Cassandra, Elasticsearch, Hadoop and Guava use MurmurHash variants for partitioning, routing and hash tables.

Because it is a non-cryptographic hash function, it is vulnerable to deliberate collision attacks. Never use murmurhash for password storage, digital signatures or message authentication. For those tasks, use a cryptographic hash like SHA-256 via the SHA-256 hash generator, or keyed constructions like HMAC via the HMAC-SHA256 generator.

32-bit versus 128-bit x64

The 32-bit variant returns a single 8-character hexadecimal string. It is fast and sufficient for hash tables with fewer than a few hundred million entries. Collision probability follows the birthday bound: around 50 percent chance after roughly 77,000 random inputs.

The 128-bit x64 variant returns a 32-character hexadecimal string. It processes data in 16-byte chunks optimized for 64-bit arithmetic, producing two 64-bit words, h1 and h2, that are concatenated. This variant has a vastly lower collision rate and is preferred when hashing large datasets, generating unique identifiers or building distributed hash rings. Note that the x86 128-bit variant exists but produces different output due to different constants and rotation amounts; this tool implements the x64 version.

Common mistakes with seeds

The seed initializes the hash state. Using the same seed for every hash in a hash table is normal, but changing the seed changes the output completely. A frequent mistake is passing a negative number or a floating-point value as the seed. The seed must be an unsigned 32-bit integer between 0 and 4294967295.

Another issue arises when hashing UTF-8 text. MurmurHash operates on raw bytes. If your system encodes strings differently before hashing, the output will not match. This tool encodes input as UTF-8 bytes before processing, which matches the behavior of most modern libraries.

Worked examples

ExampleInputResult
Empty string, seed 0Seed: 0MurmurHash3 32-bit: 00000000; MurmurHash3 128-bit x64: 00000000000000000000000000000000; Input length: 0 bytes; Seed: 0
Hello, seed 0Text to hash: Hello; Seed: 0MurmurHash3 32-bit: 12da77c8; MurmurHash3 128-bit x64: 35b974ff55d4c41ca000eacf29125544; Input length: 5 bytes; Seed: 0
The quick brown fox, seed 97Text to hash: The quick brown fox jumps over the lazy dog; Seed: 97MurmurHash3 32-bit: 2007320a; MurmurHash3 128-bit x64: fb7026e967bf8076bf17efc47a2e1201; Input length: 43 bytes; Seed: 97
Custom seed 25Text to hash: test; Seed: 25MurmurHash3 32-bit: c58fa196; MurmurHash3 128-bit x64: 9fa92c68492bc57574b172619ad7b1b4; Input length: 4 bytes; Seed: 25

FAQ

Is MurmurHash cryptographically secure?

No. MurmurHash is a non-cryptographic hash function optimized for speed and distribution. It should not be used for passwords, signatures or any context where an attacker could deliberately craft collisions.

What is the difference between MurmurHash3 32-bit and 128-bit?

The 32-bit version produces a 4-byte hash suitable for small hash tables. The 128-bit x64 version produces a 16-byte hash with far fewer collisions, making it better for large datasets and distributed systems.

Does the seed affect performance?

No. The seed only changes the initial state of the hash computation. Any valid seed takes the same amount of time to process.

Can I use this murmurhash tool offline?

Yes. The entire computation runs in your browser using JavaScript. No network requests are made and no data is uploaded to any server.

Why do my results differ from another MurmurHash tool?

Differences usually come from three sources: using the 128-bit x86 variant instead of x64, printing the two 64-bit halves in a different byte order, encoding the input string in a character set other than UTF-8, or passing a signed or truncated seed value.

What are the SMHasher verification vectors?

SMHasher is the reference test suite for non-cryptographic hashes. Its verification vectors are known-answer tests, such as hashing an empty string with seed 0 to get 00000000 for the 32-bit variant, used to confirm an implementation is correct.