CoderTools

Adler-32 Checksum Calculator

Calculate Adler-32 checksums for text and files, fast checksum used in zlib/gzip compression

Enter plain text (UTF-8 encoded)

About Adler-32

Adler-32 is a checksum algorithm invented by Mark Adler in 1995. It is used in the zlib compression library and is part of the widely-used gzip file format. Adler-32 was designed to be faster than CRC-32 while maintaining reasonable error detection capabilities.

The algorithm produces a 32-bit checksum (4 bytes) and is particularly efficient on short inputs. It is named after its creator, who is also a co-author of the gzip and zlib compression programs.

Algorithm

Adler-32 works by maintaining two running sums modulo 65521 (the largest prime less than 2^16). The checksum is computed as follows:

A = 1 + D1 + D2 + ... + Dn (mod 65521)
B = (1 + D1) + (1 + D1 + D2) + ... + (1 + D1 + ... + Dn) (mod 65521)
Adler-32 = (B << 16) | A

Characteristics

Common Use Cases

Examples

Input: "Hello, World!"

Adler-32: 1f9e046a (Hex) / 530858090 (Decimal)

Input: "" (empty string)

Adler-32: 00000001 (Hex) / 1 (Decimal)

Adler-32 vs CRC-32

Feature Adler-32 CRC-32
Speed Faster Slower
Error Detection Good Better
Common Usage zlib, PNG, gzip Ethernet, ZIP, PNG

References