Adler-32 checksum calculator — the zlib checksum, step by step

Adler-32 is the 32-bit checksum at the end of every zlib stream; enter text or bytes and the tool returns it in hex and decimal, computed exactly as RFC 1950 defines it.

Live demo · real result from this tool
Adler-32 (hex)5bdc0fda
Decimal
1541148634
Input size
43 bytes

A checksum detects accidental changes. It is not a security hash — anyone can forge data with a chosen checksum.

Processed on your device — nothing is uploaded.

How to use the Adler-32 checksum calculator

  1. Type or paste data into Text.
  2. Set Input is to Text (UTF-8), Hex bytes or Base64 bytes.
  3. 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?
Mainly in the zlib format, which wraps DEFLATE data inside PNG images, PDF streams, Git objects and many network protocols. The last four bytes of a zlib stream are the Adler-32 of the uncompressed data.
Is Adler-32 better or worse than CRC-32?
It is faster to compute in software but catches fewer errors, especially in short inputs, where the two sums stay small and do not use all 32 bits. For new formats CRC-32C is usually the better choice. Neither one protects against deliberate changes.
Why is the checksum of empty input 1 and not 0?
The first running sum starts at 1, as RFC 1950 specifies. That way a stream of zero bytes still changes the checksum, which would not happen if both sums started at zero.
My zlib tool shows the bytes in a different order. Why?
The tool prints the value as a number, high byte first. zlib also stores it high byte first, so it should match; if your tool shows it reversed, it is reading the bytes as little-endian.

Sources

  1. RFC 1950, ZLIB Compressed Data Format Specification 3.3 — IETF, accessed 2026-10-07

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close