Adler-32 Checksum Calculator – Free

This Adler-32 calculator returns the 32-bit checksum defined in RFC 1950 for typed text or raw hex bytes. The sums run in your browser, and the result appears as eight hex digits.

How to use the Adler-32 Calculator tool

  1. Under Input format, pick UTF-8 text to checksum typed characters or Hexadecimal bytes to checksum raw byte values.
  2. Type or paste the data into the Input box. Select Example to load the common test string 123456789.
  3. Select Calculate to run the checksum.
  4. Read the result, shown as 0x followed by eight uppercase hex digits, then select Copy to put it on your clipboard.

How the Adler-32 checksum is computed

Adler-32 keeps two 16-bit running sums. Sum a starts at 1 and sum b starts at 0. For every input byte, a becomes (a + byte) mod 65521, and b then becomes (b + a) mod 65521. The final checksum is b in the upper 16 bits and a in the lower 16 bits.

The modulus 65521 is the largest prime below 65536. Mark Adler designed the checksum for the zlib library, and RFC 1950 specifies it as the trailer of every zlib stream. This tool reduces both sums after each byte. Libraries that postpone the modulo for speed return the same answer.

Worked example: the text abc

The bytes of abc are 97, 98 and 99. Sum a goes 98, 196, 295. Sum b adds each new value of a: 98, 294, 589. In hex, 589 is 024D and 295 is 0127, so the checksum is 0x024D0127.

abc          ->  0x024D0127
123456789    ->  0x091E01DE
Wikipedia    ->  0x11E60398
(empty)      ->  0x00000001

Text and hex input rules

The Input format menu decides how the box is turned into bytes before the sums run.

  • UTF-8 text: every character is encoded as UTF-8, so é counts as the two bytes C3 A9. Spaces and line breaks are part of the data and are not trimmed.
  • Hexadecimal bytes: enter two hex digits per byte in upper or lower case. Spaces, commas and line breaks between bytes are ignored.
  • One 0x at the very start is removed. A prefix on every byte, as in 0x48,0x65, is rejected.
  • An odd number of digits or any other character stops the run with the message Use complete hexadecimal bytes.

Adler-32 compared with Fletcher and CRC-32

Adler-32 is a variant of the Fletcher checksum. Fletcher-32 adds 16-bit words modulo 65535, while Adler-32 adds single bytes modulo a prime. This page computes Adler-32 only. It does not output Fletcher-16 or Fletcher-32 values.

Against CRC-32, Adler-32 is cheaper to compute in software but catches fewer errors. Its weak spot is short input. The sums stay small, and sum a cannot even reach 65521 until the data is longer than 256 bytes, so part of the 32-bit range is never used. RFC 3309 cites this weakness as the reason SCTP replaced Adler-32 with CRC32C.

Where Adler-32 values turn up

You meet Adler-32 wherever zlib framing is used: the last four bytes of a zlib stream, the compressed image data inside PNG files, HTTP responses with the deflate content coding, and Git objects. The rolling checksum in rsync is modeled on it as well.

Frequently asked questions

What is the Adler-32 checksum of 123456789?

It is 0x091E01DE. The low half, 0x01DE, is 478: the nine ASCII codes add up to 477, plus the starting value 1. Many libraries print the same value in decimal as 152961502.

Why is the Adler-32 of empty input 0x00000001?

Sum a is initialized to 1 and sum b to 0, and no bytes change them. The starting 1 exists so that a run of zero bytes still alters the checksum as the length grows.

Why does my result differ from zlib.adler32 or another library?

Check the bytes first. A trailing newline, a different text encoding such as UTF-16, or hex typed while UTF-8 text is selected all change the input. Also compare formats: libraries often return a decimal integer, while this page prints hex.

Is Adler-32 safe for passwords or tamper detection?

No. It is a fast error-detection code with no secret, and it is easy to craft different inputs with the same value. Use SHA-256 for integrity against attackers and HMAC when a key is involved.

Is the text I enter sent to a server?

No. The page converts your input to bytes and runs the two sums in JavaScript on your device. The input and the checksum stay in the browser tab.

Related tools