Fletcher-32 Checksum Calculator

Compute the Fletcher-32 error-detection checksum

Computes the Fletcher-32 checksum from text or hex bytes by pairing bytes into 16-bit words with modulus-65535 running sums. Stronger burst-error detection than Fletcher-16, shown in hex and decimal. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How does Fletcher-32 differ from Fletcher-16?

Fletcher-32 processes the data as 16-bit words instead of bytes and uses modulus 65535 instead of 255. This widens the checksum to 32 bits and gives stronger detection of larger burst errors.

The Fletcher-32 checksum extends Fletcher-16 to a 32-bit result by working on 16-bit words and reducing its two running sums modulo 65535. The wider accumulator detects larger and more complex burst errors while remaining inexpensive. This calculator runs the standard algorithm locally over text or hex bytes.

How it works

Fletcher-32 keeps two running sums, both reduced modulo 65535:

  1. Start with sum1 = 0 and sum2 = 0.
  2. Read the data two bytes at a time into a 16-bit word w = (high << 8) | low.
  3. For each word: set sum1 = (sum1 + w) mod 65535, then sum2 = (sum2 + sum1) mod 65535.
  4. The final checksum is (sum2 << 16) | sum1.

If the data has an odd number of bytes, the last byte is padded with a zero high byte so it still forms one complete word.

Why Fletcher works at all — the two-sum design

A naive single-sum checksum (simply add all bytes modulo N) fails silently when two bytes are transposed, because addition is commutative and their total is unchanged. Fletcher solves this with a second running sum that accumulates the first sum after every word. The second sum is effectively a weighted accumulator: early words contribute more to sum2 than late ones, because their value has been added to sum2 more times. This position-sensitivity means that swapping any two distinct words changes sum2 even when it leaves sum1 unchanged.

The modulus 65535 (a prime minus one, specifically 2^16 − 1) is chosen for the same reason Adler-32 uses 65521: prime moduli spread values more uniformly. Using 65536 (a power of two) would lose one bit of information on the carry and weaken the error-detection.

Fletcher-16 vs. Fletcher-32 vs. Adler-32

AlgorithmWord sizeModulusOutputRelative speed
Fletcher-168-bit bytes25516 bitsFastest
Fletcher-3216-bit words6553532 bitsFast
Adler-328-bit bytes65521 (prime)32 bitsFast
CRC-328-bit bytesPolynomial GF(2)32 bitsModerate (table)

Fletcher-32 catches more burst errors than Fletcher-16 because operating on 16-bit words means a single-bit flip always changes one of the two 16-bit word values, and the 32-bit output space is wider. Adler-32 is slightly faster on byte-oriented architectures because it avoids the byte-pair assembly step. CRC-32 has the strongest error detection of the four but requires a precomputed table and more computation per byte.

Where Fletcher checksums appear

Fletcher-16 is used in OSI network layer protocols and some embedded systems. Fletcher-32 appears in some file formats and protocol specifications that need a quick 32-bit check without the complexity of a CRC table. Neither variant is a cryptographic primitive — an attacker can trivially craft data with any desired Fletcher checksum.

Example

For the ASCII string abcde the algorithm produces the checksum 0xF04FC729. Enter it in the tool to confirm the same hex and decimal output.

Notes

The modulus 65535 (2^16 - 1) plays the same role as 255 does in Fletcher-16: it keeps the sums position-sensitive so byte and word swaps are detected. Fletcher-32 is a data-integrity check only and does not defend against intentional tampering. All computation runs in your browser.