Adler-32 Checksum Calculator

Compute the Adler-32 checksum of a short ASCII string byte by byte.

Technology and NetUpdated 2026-11-203 min read
Adler-32 Checksum Calculator
Printable ASCII characters only, codes 32 to 126. Up to 4,096 characters.
Checksum hexadecimal
...
Checksum decimal...
Final A word...
Final B word...

What it does

Adler-32 is a checksum used in the zlib compressed data format. It is a 32 bit value made from two smaller sums, which makes it quick to compute in software. The zlib library exposes it through its adler32 function, and RFC 1950 defines how it sits inside a zlib stream.

The algorithm starts with A = 1 and B = 0. For each byte of input, A increases by that byte and B increases by the new value of A. Both sums are reduced modulo 65521, the largest prime below 65536. At the end the two words are combined as B × 65536 + A.

The prime modulus matters. It keeps the arithmetic well behaved and gives the checksum better error detection than a simple sum of bytes. Adler-32 is an extension of the older Fletcher checksum, adapted to 32 bit words.

This tool takes printable ASCII text, converts each character to its byte value and shows the final checksum in hexadecimal and decimal. It also shows the final A and B words, so you can follow the arithmetic by hand or compare against a library call.

A checksum is an integrity check, not a cryptographic signature. It can catch accidental changes to data, but an attacker can construct different text with the same Adler-32 value.

How to use

  1. Type a short string of printable ASCII text into the input box.
  2. Read the hexadecimal checksum first, which is the form most libraries return.
  3. Check the decimal value if your system expects an unsigned integer.
  4. Look at the final A and B words to understand how the two sums ended.
  5. Use the table below to follow the same input one character at a time.
  6. Compare the result with an adler32 call in zlib or another library when you need an independent check.

Formula

A = (A + byte) mod 65521. B = (B + A) mod 65521. Adler-32 = B × 65536 + A, starting from A = 1 and B = 0.
A
Running sum of all bytes so far, reduced modulo 65521.
B
Running sum of the successive values of A, also reduced modulo 65521.
byte
The ASCII code of the current character, from 32 to 126 here.
65521
The prime modulus, the largest prime smaller than 65536.

The engine uses character codes directly because the accepted input is printable ASCII, where one character is exactly one byte. Non ASCII characters are rejected so that the byte stream stays unambiguous. The hexadecimal output is padded to eight digits with leading zeros.

Worked example

Example: the string Wikipedia

Input Wikipedia, nine printable ASCII characters.

  1. Start with A = 1 and B = 0.
  2. Character W has code 87, so A = 88 and B = 88.
  3. Character i has code 105, so A = 193 and B = 88 + 193 = 281.
  4. Character k has code 107, so A = 300 and B = 581.
  5. The remaining six characters bring A to 920 and B to 4582, as the table shows.
  6. Combine the words: 4582 × 65536 + 920 = 300,286,872.
  7. Written in hexadecimal that is 0x11E60398, which is the main result.

Reference table

Running words for the string Wikipedia
CharacterASCII codeA after byteB after byte
W878888
i105193281
k107300581
i105405986
p1125171503
e1016182121
d1007182839
i1058233662
a979204582

Limits

  • The input is limited to printable ASCII, so accented letters and emoji are rejected.
  • This is an integrity checksum, not a cryptographic hash or a signature.
  • Different byte encodings of the same visible text produce different checksums.
  • The tool computes a checksum for text you paste. It does not read files.

Common mistakes

  • Pasting text with a non breaking space, which is outside the printable ASCII range and is rejected.
  • Comparing a decimal result from one library with a hexadecimal result from another without converting.
  • Assuming a matching checksum proves the data is authentic rather than merely unchanged by accident.
  • Using a different character encoding and expecting the same checksum as an ASCII computation.
  • Forgetting that the modulus applies to B after adding the updated A, not to the byte alone.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is the Adler-32 of Wikipedia in hexadecimal?

0x11E60398. The decimal form is 300,286,872 with final A = 920 and B = 4,582.

Starting from A = 1, what are A and B after the single byte 65?

A = 66 and B = 66. The checksum would be 66 × 65536 + 66 = 4,325,442, shown as 0x00420042.

Why is 65521 used as the modulus?

It is the largest prime below 65536, which keeps each word inside 16 bits and gives better detection than a power of two modulus.

Questions

Where is Adler-32 used?

In the zlib compressed data format, where RFC 1950 stores it as the ADLER32 field for the uncompressed data.

Is Adler-32 a hash function?

It is a checksum. It detects accidental changes but is not collision resistant and must not be used for security.

How is it different from CRC-32?

Adler-32 uses two modular sums and is usually faster in software. CRC-32 uses polynomial division and detects a wider range of errors.

Why does the tool reject Unicode?

The algorithm works on bytes, not characters. Restricting input to printable ASCII keeps one character equal to one byte.

What do the A and B words mean?

A is the sum of all bytes. B is the sum of all running values of A. They are combined into the final 32 bit checksum.

Can two different strings share an Adler-32 value?

Yes. The 32 bit output space is finite and the construction is not collision resistant, so collisions can be found deliberately.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.