FNV1A32 Hash Tool
Other Hash Generator
MD2 MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512/224 SHA512/256 SHA512 SHA3-224 SHA3-256 SHA3-384 SHA3-512 RIPEMD128 RIPEMD160 RIPEMD256 RIPEMD320 WHIRLPOOL TIGER128,3 TIGER160,3 TIGER192,3 TIGER128,4 TIGER160,4 TIGER192,4 SNEFRU SNEFRU256 GOST GOST-CRYPTO ADLER32 CRC32 CRC32B CRC32C FNV132 FNV1A32 FNV164 FNV1A64 JOAAT MURMUR3A MURMUR3C MURMUR3F XXH32 XXH64 XXH3 XXH128 HAVAL128,3 HAVAL160,3 HAVAL192,3 HAVAL224,3 HAVAL256,3 HAVAL128,4 HAVAL160,4 HAVAL192,4 HAVAL224,4 HAVAL256,4 HAVAL128,5 HAVAL160,5 HAVAL192,5 HAVAL224,5 HAVAL256,5The FNV-1a 32-bit hash algorithm is a non-cryptographic hashing function designed for high performance and good dispersion of hash values. It operates on arbitrary-length data, converting it into a fixed 32-bit output that can be used for hash tables, checksums, and fingerprinting. Its design emphasizes simplicity, speed, and low collision rates for small to medium-sized inputs.
Initialization
The algorithm begins by initializing the hash value to a predefined 32-bit offset basis. This constant ensures that the resulting hash values are well distributed across the 32-bit space. For FNV-1a 32-bit, the offset basis is 2166136261.
Processing Input
FNV-1a processes input data one byte at a time. Each byte of the input is XORed with the current hash value. This step introduces the input data into the evolving hash in a manner that sensitively affects all bits of the hash value. After the XOR operation, the hash is multiplied by a fixed 32-bit prime number, 16777619, which serves to mix the bits and reduce collisions. This sequence—XOR followed by multiplication—is repeated for every byte of input.
Finalization
After processing all bytes of the input, the final 32-bit hash value is produced. This value is typically used directly as a hash code or can be further masked or combined depending on the application. The algorithm does not include any additional transformations or complex bit-shifting operations, which contributes to its efficiency.
Properties
- Deterministic: The same input always produces the same hash output.
- High dispersion: Small changes in input produce widely different hash values.
- Efficiency: Designed for fast computation with minimal memory usage.
- Non-cryptographic: While effective for hash tables, it is not suitable for cryptographic security.
Applications
FNV-1a 32-bit is widely used in data structures such as hash tables, bloom filters, and sets where rapid indexing and low collision rates are required. It is particularly favored in systems where computational efficiency is critical and cryptographic security is not needed. The simplicity of its implementation allows it to be deployed across multiple programming languages and hardware architectures without modification.