How to use the Adler-32 checksum calculator
- Type or paste data into Text.
- Set Input is to Text (UTF-8), Hex bytes or Base64 bytes.
- Read Adler-32 (hex), the Decimal value and the Input size in bytes. The result updates as you type.
What it does and when to use it
Mark Adler designed this checksum for zlib so that compressed data could be checked quickly on slow machines. You need it when you write or debug code that creates zlib streams by hand, when a decompressor reports “incorrect data check”, or when you study a PNG or PDF at byte level. It is also a classic example of a rolling checksum: the same two-sum idea lets tools such as rsync slide a window along a file cheaply.
If you are working with the containers around it, the CRC-32 calculator covers the gzip and PNG chunk checks. The simple string hash table shows Adler-32 next to a dozen other fast hashes, and the CRC-16 calculator handles 16-bit serial checksums.
How it works
The code (from the hash-wasm library, running in your browser) keeps two running sums, both kept below 65,521, the largest prime under 2¹⁶:
- A starts at 1. Each byte is added to A.
- B starts at 0. After each byte, the new A is added to B.
- The checksum is B × 65,536 + A, written as 8 hex digits.
Because B adds up every intermediate A, it depends on the order of the bytes, so swapping two bytes changes the result. A on its own would only notice which bytes are present.
Worked examples
“abc” by hand. The bytes are 97, 98 and 99.
| Byte | A | B |
|---|---|---|
| start | 1 | 0 |
| a (97) | 98 | 98 |
| b (98) | 196 | 294 |
| c (99) | 295 | 589 |
A = 295 = 0x0127 and B = 589 = 0x024d, so the tool shows Adler-32 (hex): 024d0127 (decimal 38600999).
Reference value. Wikipedia gives 11e60398, decimal 300286872.
Empty input. With Input is set to Hex bytes and nothing typed, A stays 1 and B stays 0, so the result is 00000001.
Limits and tips
- On inputs shorter than a few hundred bytes, A never gets near 65,521, so many bit patterns are unused and error detection is weaker than the 32 bits suggest.
- Like every checksum, Adler-32 can be forged on purpose. Use SHA-256 to check files from untrusted sources.
- Text is hashed as UTF-8 bytes. Characters such as é count as two bytes.
Frequently asked questions
Where is Adler-32 used?
Is Adler-32 better or worse than CRC-32?
Why is the checksum of empty input 1 and not 0?
My zlib tool shows the bytes in a different order. Why?
Sources
- RFC 1950, ZLIB Compressed Data Format Specification 3.3 — IETF, accessed 2026-10-07
How do we know nothing is uploaded? Test it yourself on the privacy proof page.