xxHash is one of the fastest hash functions ever published, fast enough to keep up with RAM bandwidth, which is why it powers LZ4, Zstandard and countless databases. This calculator computes both the XXH32 and XXH64 variants with an optional seed, entirely in your browser.
How it works
Both variants follow the same shape: a striped accumulation loop followed by a finalisation avalanche.
- If the input is long enough, four accumulators (
v1..v4) seeded from the input seed each absorb a lane of the data through a round step (add, rotate-left, multiply by a prime). - The accumulators are combined by rotating and adding them, then for XXH64 merged with extra mixing rounds.
- The input length is added, remaining bytes are consumed in 8-, 4- and 1-byte steps, and a final avalanche of XORs and prime multiplications scrambles the bits.
XXH32 works on 32-bit lanes with modulus 2^32; XXH64 works on 64-bit lanes with modulus 2^64.
Example
For the string abc with seed 0, XXH32 is 0x32d153ff and XXH64 is 0x44bc2cf5ad770999. An empty string gives XXH64 0xef46db3751d8e999.
Notes
The 64-bit path uses BigInt to keep all 64 bits exact, while XXH32 uses an emulated 32-bit multiply for correct overflow, so outputs match the reference implementation. xxHash is non-cryptographic; never use it where collision resistance against an adversary matters. All computation is local.