About this Adler-32 calculator
Adler-32 is a fast checksum designed by Mark Adler for the zlib compression library, where it guards zlib streams, and it is also used in rsync-style tools. It keeps two sums. A starts at 1 and adds each byte; B adds the current A after every byte. Both are taken modulo 65521, the largest prime below 2¹⁶, and the checksum is B shifted left by 16 bits plus A. Because B weights earlier bytes more heavily, swapping two bytes changes the result. Adler-32 is quicker than CRC32 but weaker on very short inputs, and like any checksum it detects accidental errors but is not a security hash. Text here is read as UTF-8.
How to calculate an Adler-32 checksum
- Enter your text. Type or paste the text, or press an example such as Wikipedia.
- Press Calculate Adler-32. The checksum appears in hex, decimal, and binary, with a Copy button for each.
- Follow the trace. Check the A and B sums and see how each byte updated them, which is handy for learning or debugging an implementation.
Frequently asked questions
What is the Adler-32 of “Wikipedia”?
It is 11E60398 in hex, or 300286872 in decimal. This is the classic worked example, with A = 920 (0x398) and B = 4582 (0x11E6).
Why is 65521 used?
It is the largest prime number smaller than 65536. Using a prime modulus spreads the sums more evenly than a power of two and helps catch more errors.
What is the Adler-32 of empty input?
It is 00000001, because A starts at 1 and B starts at 0, and nothing is added.
Is Adler-32 better than CRC32?
It is simpler and faster to compute, but CRC32 detects more kinds of errors, especially in short messages. zlib uses Adler-32; gzip and ZIP use CRC32.
Can Adler-32 be used for passwords or signatures?
No. It is easy to create different data with the same checksum. Use a cryptographic hash such as SHA-256 when security matters.