Fletcher-16 Checksum Calculator

Compute the Fletcher-16 error-detection checksum

Ad placeholder (leaderboard)

The Fletcher-16 checksum is a lightweight error-detection algorithm devised by John G. Fletcher. It is far stronger than a plain modular byte sum because it is position-sensitive, yet it is cheap enough to run on small embedded devices. This calculator runs the exact algorithm in your browser over either UTF-8 text or raw hex bytes.

How it works

Fletcher-16 keeps two running sums, both reduced modulo 255:

  1. Start with sum1 = 0 and sum2 = 0.
  2. For each byte b: set sum1 = (sum1 + b) mod 255, then sum2 = (sum2 + sum1) mod 255.
  3. The final checksum is (sum2 << 8) | sum1sum2 is the high byte and sum1 is the low byte.

Because sum2 accumulates every intermediate value of sum1, the checksum depends on the position of each byte, not just the total. Swapping two bytes changes the result, which a simple sum would miss.

Example

For the ASCII string abcde (bytes 97 98 99 100 101) the running sums settle at sum1 = 240 and sum2 = 200, giving a checksum of 0xC8F0. Try it in the tool to see the same value.

Notes

The odd modulus 255 is deliberate — it prevents the running sums from ever locking into a value that would hide a byte swap. Fletcher-16 is an integrity check only and offers no protection against deliberate tampering. Everything here is computed locally; your data never leaves the browser.

Ad placeholder (rectangle)