Tooleux

XXH32

XXHash (4)

Compute the fast 32-bit XXH32 hash of any input, with an optional seed.

Runs in your browser. Nothing leaves your device.
Calculate XXH32 non-cryptographic hashes with an optional seed. Free, offline, runs in your browser. Read more Show less

What is XXH32?

XXH32 is a 32-bit non-cryptographic hash designed by Yann Collet in 2012. It runs at several gigabytes per second on modern CPUs and distributes keys far better than CRC-32 or Adler-32, which makes it the right tool for hash tables, Bloom filters, deduplication, and file fingerprints where speed matters more than cryptographic strength.

XXH32 is not a cryptographic hash. Collisions can be found on purpose, and a seed is not a key. Never use it for passwords, signatures, or integrity against an adversary. Use SHA-256 or BLAKE3 for those.

XXH32 accepts a 32-bit seed. Changing the seed produces an unrelated hash family from the same input, which is useful when you want independent hash functions (for example, multiple hash buckets or shard routing keys).

How to compute XXH32

Type or paste your input. The tool hashes the raw bytes, so choose the correct input encoding: UTF-8 text, hex, or Base64. For example, the UTF-8 string hello with seed 0 produces:

fb0077f9

The seed

The seed is a 32-bit unsigned integer. Enter it as decimal or hex with a 0x prefix. It is not a secret. XXH32 with a seed is still not a MAC - use HMAC for that.

FAQ

XXH32 vs XXH64 vs XXH3

XXH64 produces a 64-bit output and is the standard choice on 64-bit machines. XXH3 (64-bit and 128-bit variants) is the modern version - faster than both on almost every input and better distributed. Prefer XXH3 for new work; use XXH32 or XXH64 only for compatibility with an existing format. See XXH64 and XXH3.

XXH32 vs CRC-32

Both are fast. CRC-32 is designed to detect bit errors in storage and network transmission. XXH32 is designed for hash tables - it avoids clustering and resists structured inputs. Choose based on the job. See CRC-32.

Is XXH32 stable across languages?

Yes. The algorithm is fully specified and output is identical across xxHash C, xxhash-wasm, Go, Python xxhash, and Rust twox-hash for the same input and seed.

Why does my hash not match another tool?

Check three things: (1) input encoding - UTF-8 vs hex vs Base64; (2) trailing whitespace or a newline at the end of the input; (3) the seed value. A different seed produces a completely different hash.

Command line equivalent
# xxhsum (from the xxHash distribution)
echo -n "hello" | xxhsum -H0            # XXH32, seed 0
echo -n "hello" | xxhsum -H0 -s 1234    # XXH32 with seed 1234

# Python
pip install xxhash
python3 -c 'import xxhash; print(xxhash.xxh32(b"hello").hexdigest())'

# Node
npm i xxhash-wasm
node --input-type=module -e 'import xxhash from "xxhash-wasm"; const h = await xxhash(); console.log(h.h32("hello").toString(16).padStart(8,"0"))'
Loads a test value into the form
Input
XXH32