Adler-32 Checksum Calculator

Enter text to compute its Adler-32 checksum.

Result

0x11E60398
300,286,872
A=920, B=4582

How it is calculated

The tool reads your text as bytes (UTF-8, so one accented letter can be two bytes) and keeps two sums. It starts with A = 1 and B = 0. For every byte, A = (A + byte) mod 65521 and then B = (B + A) mod 65521. The checksum is B × 65536 + A, shown as an 8-digit hexadecimal number with a 0x prefix, as a decimal number, and as the final A and B values. 65521 is the largest prime below 65536. Every character counts, including spaces, tabs and line breaks, so a trailing space gives a different checksum. An empty box gives no result. The checksum detects accidental changes; it is not a secure hash.

Worked example

Text: Wikipedia. The nine byte values are 87, 105, 107, 105, 112, 101, 100, 105, 97. Running A: 1+87 = 88, then 193, 300, 405, 517, 618, 718, 823 and 920. Running B adds each A: 88, 281, 581, 986, 1503, 2121, 2839, 3662 and 4582. So A = 920 and B = 4582. The checksum is 4582 × 65536 + 920 = 300286872, which in hexadecimal is 0x11E60398. The tool shows the hexadecimal checksum 0x11E60398, the decimal value 300,286,872 and the parts A=920, B=4582.

Try this example →

Common mistakes

  • Copying text with a trailing space or newline. These bytes are included, so the checksum will not match one calculated on the clean text.
  • Comparing with a checksum made on another encoding. Text is read as UTF-8 bytes here; a file saved in a different encoding has different bytes and a different result.
  • Confusing Adler-32 with CRC-32 or MD5. The values and lengths differ, and a CRC-32 reference will not match.
  • Reading the checksum as a hash to protect against tampering. It is easy to engineer two different texts with the same value, so it only catches accidental errors.
  • Comparing the hex value with a decimal one. 0x11E60398 and 300,286,872 are the same number written two ways; compare like with like.

About this calculator

The Adler-32 checksum is a fast error-detection algorithm that processes text or binary data byte by byte, maintaining two running sums — A, the sum of all bytes plus one (mod 65521), and B, the running sum of A after each byte (mod 65521) — then combines them into a single 32-bit value as B×65536 + A. This calculator computes both running sums and the final checksum in hexadecimal and decimal form for any input text.

Adler-32 was designed as a faster, simpler alternative to CRC-32 and is best known as the checksum built into zlib, the compression library used by PNG, ZIP-family formats and countless other systems, where it's applied to compressed data blocks to catch transmission or storage corruption. Software developers and systems programmers use tools like this to verify their own Adler-32 implementation matches a known-good reference, or to manually check the checksum embedded in a zlib stream while debugging.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Adler-32 is the checksum at the end of a zlib stream: the last four bytes are the checksum of the uncompressed data, so you can compare them with the hexadecimal value here. It is weak on very short inputs, where the sums stay small and many different texts end up looking alike. What are you checking it against, a zlib stream or something else?

Popular calculators

All Calculators