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)
Result Adler-32
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
- Output: 32-bit (4 bytes, 8 hex characters)
- Speed: Faster than CRC-32, especially on software implementations
- Modulo: Uses prime number 65521 for better distribution
- Initial value: A=1, B=0 (empty string produces checksum of 1)
Common Use Cases
- zlib library - data compression checksum
- gzip file format - integrity verification
- PNG image format - chunk integrity
- Quick data validation where speed is prioritized over collision resistance
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 |