FNV-1a Hash Calculator

Calculate the FNV-1a (Fowler/Noll/Vo, variant a) hash of any text and get the 8-character hexadecimal result, the more widely recommended FNV variant thanks to its better bit-distribution behavior. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

FNV-1a is the more commonly recommended member of the FNV hash family, a tiny reordering of FNV-1's two operations that gives it measurably better distribution for the same simplicity and speed.

This tool computes the 32-bit FNV-1a hash of any text you provide, entirely in your browser, for reproducing hash table bucket assignments or matching the many systems that default to this variant over plain FNV-1.

What Is FNV-1a Hash Calculator?

FNV-1a (Fowler/Noll/Vo, variant a) is a non-cryptographic hash function that reorders FNV-1's per-byte operations, XOR then multiply instead of multiply then XOR, producing a 32-bit result in this tool, shown as 8 hexadecimal characters.

Despite the tiny change, FNV-1a's avalanche properties are noticeably better than FNV-1's, which is why it's the variant most commonly recommended and implemented by default across language standard libraries and tooling today.

How FNV-1a Hash Calculator Works

Starting from the 32-bit FNV offset basis (0x811c9dc5), each byte of your UTF-8 encoded text first gets XORed into the running hash, then the hash is multiplied by the FNV prime (0x01000193, mod 2^32).

After processing every byte, the final 32-bit value is hex-encoded into the 8-character output this tool returns.

When To Use FNV-1a Hash Calculator

Use FNV-1a for fast, simple hash table hashing, generating short deterministic identifiers, or matching a system that already defaults to it (many do).

Avoid it wherever an adversary might choose input specifically to cause collisions, hash-flooding-style denial of service on a hash table exposed to untrusted input calls for a keyed hash like SipHash instead.

Often used alongside FNV-1 Hash Calculator and xxHash Calculator.

Features

Advantages

  • Better bit distribution than plain FNV-1, from a trivially small implementation change.
  • Extremely fast and simple: one XOR and one multiply per byte.
  • Widely adopted as the default FNV variant across many languages and tools.

Limitations

  • Not cryptographically secure; fully predictable and vulnerable to deliberately chosen colliding input.
  • 32-bit output is prone to accidental collisions at scale (the birthday bound applies well before 2^32 items).
  • Not appropriate for hash tables exposed to untrusted, potentially adversarial keys without additional protection.

Examples

Hashing a short greeting

Input

Hello, world!

Output

ed90f094

13 bytes of UTF-8 text produce the standard 8-character 32-bit FNV-1a hash.

Hashing a well-known FNV reference string

Input

foobar

Output

bf9cf968

This exact value is one of the most widely cited 32-bit FNV-1a test vectors, useful for confirming any implementation matches the standard.

Best Practices & Notes

Best Practices

  • Default to FNV-1a over FNV-1 unless you specifically need to match the original multiply-then-XOR ordering.
  • For hash tables exposed to untrusted input, pair with (or replace with) a keyed hash like SipHash to prevent hash-flooding attacks.
  • For very large datasets, consider a 64-bit hash width instead of 32-bit to reduce accidental collision probability.

Developer Notes

This tool implements the 32-bit FNV-1a algorithm directly per the IETF draft specification (offset basis 0x811c9dc5, prime 0x01000193, XOR-then-multiply per byte), verified against published FNV-1a test vectors including "foobar" (0xbf9cf968).

FNV-1a Hash Calculator Use Cases

  • Fast, non-adversarial hash table or dictionary key hashing
  • Generating short deterministic identifiers for caching or bucketing
  • Reproducing a known FNV-1a test vector while debugging another implementation
  • Matching a checksum from a language runtime or library that defaults to FNV-1a

Common Mistakes

  • Using FNV-1a for a hash table exposed to untrusted, potentially adversarial input without additional collision protection.
  • Confusing FNV-1a output with FNV-1 output; the two differ for the same input due to their reversed operation order.
  • Assuming FNV-1a provides any resistance to deliberate collisions; it's a distribution-focused hash, not a security one.

Tips

  • If a hash table is exposed to untrusted keys and denial-of-service via collisions is a concern, look at SipHash instead of FNV-1a.
  • Compare this tool's output against the MurmurHash3 or xxHash tools on the same input to see how differently each non-cryptographic hash family distributes bits.

References

Frequently Asked Questions