Toolstia / Adler-32 and Fletcher checksum calculator

Adler-32 and Fletcher checksum calculator

Checksums are short numbers that catch accidental changes in data. Enter text or hex bytes to get Adler-32 (used by zlib), Fletcher-16, Fletcher-32 and the 8 bit sum and XOR, each in hex and decimal.

Adler-32 is the checksum used by zlib. Fletcher checksums are simple error-detecting sums. Fletcher-32 reads the data as little-endian 16 bit words and pads an odd length with a zero byte. These catch accidental changes but are not secure hashes.

How it works

  1. Choose text or hex bytes.
  2. Enter the data.
  3. Read the checksums in hex and decimal.

Adler-32

Two running sums modulo 65521, joined into one 32 bit number. The checksum of Wikipedia is 11e60398. It is faster than CRC32 but weaker on short data.

Fletcher-16 and 32

Two running sums, modulo 255 for the 16 bit form and modulo 65535 on 16 bit words for the 32 bit form. Fletcher-32 reads little-endian words and pads an odd length with a zero byte.

8 bit sum and XOR

The simplest checks: add all bytes and keep the low 8 bits, or XOR them together.

Not for security

These detect accidental errors only. Anyone can change data and still match a checksum, so use a hash such as SHA-256 when security matters.

Questions

Is my data sent anywhere?

Everything happens in your browser, and nothing you enter is sent anywhere.

Why is my Fletcher-32 different from another tool?

Tools differ on word order and padding. This one uses little-endian 16 bit words, the same as the common reference code, and pads with a zero byte.

Is this the same as CRC32?

No. CRC32 uses polynomial division and has its own tool on this site.