Miklix

XXH-64 Hash Code Calculator

Published: February 10, 2025 at 4:38:20 PM UTC

Hash code calculator that uses the XXHash 64 bit (XXH-64) hash function to calculate a hash code based on text input or file upload.

XXH, also known as XXHash, is a fast, non-cryptographic hash algorithm designed for high performance and efficiency, especially in situations where speed is critical, such as in data compression, checksums, and database indexing. The variant presented on this page produces a 64 bit (8 byte) hash code, typically visualized as a 16 digit hexadecimal number.

Full disclosure: I did not write the specific implementation of the hash function used on this page. It is a standard function included with the PHP programming language. I only made the web interface to make it publicly available here for convenience.


Calculate New Hash Code

Data submitted or files uploaded through this form will only be kept on the server for as long as it takes to generate the requested hash code. It will be deleted immediately before the result is returned to your browser.

Input data:



Submitted text is UTF-8 encoded. Since hash functions operate on binary data, the result will be different than if the text was in another encoding. If you need to calculate a hash of a text in a specific encoding, you should upload a file instead.



About the XXH-64 Hash Algorithm

I'm not a mathematician, but I'll try to explain this hash function using an analogy that my fellow non-mathematicians can understand. If you prefer a scientifically correct, full-on math explanation, I'm sure you can find that elsewhere ;-)

Try to imagine XXHash as a big blender. You want to make a smoothie, so you add a bunch of different ingredients. The special thing about this blender is that it outputs the same size smoothie no matter how many ingredients you put it in, but if you make even just tiny changes to the ingredients, you will get a completely differently flavored smoothie.

Step 1: Mixing the Data

Think of your data as a bunch of different fruits: apples, bananas, strawberries.

  • You toss them into a blender.
  • You blend them at high speed.
  • No matter how big the fruits were, you end up with a small, well-mixed smoothie.

Step 2: The Secret Sauce - Stirring with “Magic” Numbers

To make sure the smoothie (hash) is unpredictable, XXHash adds a secret ingredient: big "magic" numbers called primes. Why primes?

  • They help with mixing data more evenly.
  • They make it hard to reverse-engineer the original ingredients (data) from the smoothie (hash).

Step 3: Speed Boost: Chopping in Bulk

XXHash is super fast because instead of chopping one fruit at a time, it:

  • Chops big groups of fruits all at once.
  • This is like using a giant food processor instead of a small knife.
  • This allows XXHash to handle gigabytes of data per second - perfect for huge files!

Step 4: Final Touch: The Avalanche Effect

Here’s the magic:

  • Even if you change just one tiny thing (like a comma in a sentence), the final smoothie tastes completely different.
  • This is called the avalanche effect:
    • Small changes = huge differences in the hash.
    • It's like adding a drop of food coloring to water, and suddenly the entire glass changes color.

Share on BlueskyShare on FacebookShare on LinkedInShare on TumblrShare on XShare on LinkedInPin on Pinterest

Mikkel Bang Christensen

About the Author

Mikkel Bang Christensen
Mikkel is the creator and owner of miklix.com. He has over 20 years experience as a professional computer programmer/software developer and is currently employed full-time for a large European IT corporation. When not blogging, he spends his spare time on a vast array of interests, hobbies, and activities, which may to some extent be reflected in the variety of topics covered on this website.