Fowler–Noll–Vo · hash tables · non-cryptographic

FNV hash

FNV (Fowler–Noll–Vo) — one of the simplest non-cryptographic hashes. FNV-1a (XOR then multiply) has better avalanche than FNV-1 (multiply then XOR). Pure JavaScript.

0 chars
FNV hash
 

How to use this tool

  1. Type or paste text into the Input text box — the hash appears instantly in the FNV hash display below it.
  2. Pick a variant with the tabs: FNV-1a 32-bit, FNV-1a 64-bit, FNV-1 32-bit, or FNV-1 64-bit. The value updates as you switch.
  3. Read the result as hex — 32-bit variants produce 8 hex digits, 64-bit variants produce 16, each prefixed with 0x.
  4. Hit Copy to put the hash on your clipboard.
  5. Use Clear to reset the input and start over.

Why this tool is helpful

Hash tables & dictionaries

FNV is a classic choice for hash-table and dictionary keys — fast, small, and well-distributed. Generate the exact index values your map would use.

Bloom filters & hash sets

FNV-1a is a common building block for bloom filters and probabilistic sets. Compute its contribution quickly without writing a helper.

Verify your own implementation

Port FNV to another language and check your output against this reference — the offset basis and prime values are standard and widely published.

Understand FNV-1 vs FNV-1a

Flip between tabs to see how the multiply-then-XOR (FNV-1) and XOR-then-multiply (FNV-1a) order changes the result and improves avalanche.

Non-cryptographic checksums

FNV appears in DNS servers, distributed hash tables, and lightweight checksums where speed matters more than security.

Stay private

Everything runs in your browser. Nothing is uploaded, logged, or sent to a server — safe for internal names and identifiers.

FAQ

What is FNV?

FNV (Fowler–Noll–Vo) is a simple, non-cryptographic hash function. It folds an arbitrary-length input into a fixed-size integer (32- or 64-bit) using a starting offset basis and a constant prime.

What's the difference between FNV-1 and FNV-1a?

The order of operations. FNV-1 multiplies by the prime then XORs each byte; FNV-1a XORs each byte then multiplies. FNV-1a spreads small changes better (improved avalanche), so it's the more common choice.

Is FNV secure or reversible?

No on both counts. FNV is a one-way digest, but it's not cryptographic — it's designed for speed and even distribution in hash tables, not for passwords or security. Use SHA-256 or similar when security matters.

Why do 32-bit and 64-bit give different values?

They use different offset basis and prime constants and produce different output widths. The 64-bit variants compute with JavaScript BigInt and return 16 hex digits instead of 8. That's expected.

How does it handle non-ASCII text?

This tool hashes each UTF-16 code unit via charCodeAt, and the 64-bit variants keep only the low byte. Plain ASCII matches the standard published FNV values; multibyte text may differ from FNV implementations that hash UTF-8 bytes.

Does any of my data leave my browser?

Never. All hashing happens locally in JavaScript. Your input is not sent to, stored on, or logged by any server.