Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Free tool · Security and privacy

Checksum calculator

A checksum calculator turns any bytes into a short number that changes when the data changes. The text 123456789 gives cbf43926 as CRC-32 and 091e01de as Adler-32, and this page shows ten more beside them.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

What are you checking?
Write the value as

Hex with 1 to 8 digits (a missing leading zero is fine, so 91E01DE works). The page says which checksum gives that value for this input.

CRC-32

cbf43926Also named CRC-32/ISO-HDLC and PKZIP, in libpng and XZ Utils

  • 9 bytes of text
All twelve checksums
ChecksumValue
CRC-32cbf43926
CRC-32Ce3069283
CRC-16/CCITT-FALSE29b1
CRC-16/XMODEM31c3
CRC-16/MODBUS4b37
CRC-8f4
Adler-32091e01de
Fletcher-161ede
Fletcher-32df09d509
Internet checksumf62a
8-bit sumdd
8-bit XOR31
Input size
9 bytes
Source
Text
Match for your value
Nothing pasted

How to use the File Checksum Calculator

  1. Pick Text, Hex bytes or A file under What are you checking? and enter the data.
  2. Choose the checksum to show first in the Checksum to show first list. The table below it always lists all twelve.
  3. Switch Write the value as between lower case hex, upper case hex and a decimal number.
  4. Paste a value into Checksum you were given to see which checksum, if any, produces it for your data.

What does this checksum calculator work out?

Twelve checksums are worked out together from the same bytes. Text is read as UTF-8, so an accented letter counts as two bytes. In hex mode you type the bytes yourself, with spaces, commas or 0x prefixes between them. A file is read on your device and never uploaded.

The usual way to test an implementation is the nine ASCII characters 123456789. The CRC catalogue lists cbf43926 as the check value for CRC-32, so a program that prints something else for that string has a setting wrong. The table shows all twelve results for it.

Checksums of the text 123456789 (9 bytes)
ChecksumBitsHexDecimal
CRC-3232cbf439263421780262
CRC-32C32e30692833808858755
CRC-16/CCITT-FALSE1629b110673
CRC-16/XMODEM1631c312739
CRC-16/MODBUS164b3719255
CRC-88f4244
Adler-3232091e01de152961502
Fletcher-16161ede7902
Fletcher-3232df09d5093741963529
Internet checksum16f62a63018
8-bit sum8dd221
8-bit XOR83149

How is a checksum calculated by hand?

Fletcher-16 is short enough to follow on paper. Keep two sums, a and b, both starting at 0. For each byte, add it to a, then add the new a to b, and reduce both modulo 255. At the end the result is b times 256 plus a. For the five letters abcde the walk is below: the last row has a = 240 and b = 200, so the checksum is c8f0.

Adler-32 uses the same idea with a starting at 1 and both sums reduced modulo 65521, the largest prime below 65536, as RFC 1950 defines it. A CRC does something different: it treats the bytes as one very long binary number and keeps the remainder after dividing by a fixed polynomial, so it reacts to the order of the bytes and to single flipped bits more strongly than a plain sum.

Fletcher-16 of abcde, one byte at a time
LetterByteab
a979797
b9819537
c993976
d100139215
e101240200

Why do two tools give different CRC-16 values?

CRC names a whole family of formulas. The width, the polynomial, the start value, whether the bits are read in reverse and a final XOR all change the answer. Three common CRC-16 versions split the same input 123456789 into 29b1, 31c3 and 4b37. CRC-16/CCITT-FALSE and CRC-16/XMODEM share the polynomial 0x1021 and differ only in the start value (0xFFFF against 0). The catalogue notes that CCITT-FALSE, also called IBM-3740, is often mislabeled as CRC-CCITT, which is why a search for CRC-CCITT sometimes lands on the wrong value.

Match your device or library by running its documented test string here and keep the variant whose check value agrees. If you already hold a value, paste it under the expected box: the calculator names every checksum of the right width that gives that number for your data.

How do I check a download, a message or a data frame?

Compute the checksum of what you received and compare it with the one that was sent. They match when the data is very probably intact. They differ when at least one bit changed on the way. Changing one letter of hello world to hello worle moves CRC-32 from 0d4a1185 to 7a4d2113 and Adler-32 from 1a0b045d to 1a0c045e.

The Internet checksum from RFC 1071 adds 16-bit words and inverts the folded total. The RFC's own bytes 00 01 f2 03 f4 f5 f6 f7 add to ddf2 and the stored checksum is 220d. An odd number of bytes is padded with one zero byte for the sum, and this page does the same for the Internet checksum and Fletcher-32.

Keep in mind what a checksum is for. It catches accidents such as noise on a line, a bad disk sector or a cut download. It does not stop a person who changes a file on purpose, because a matching CRC can be forged. To verify a file against a published digest use the SHA-256 generator, and to read the bytes behind a text try the Base64 decoder or the hex calculator.

Use it with

Questions

What is a checksum?

A short number worked out from data so that a change in the data shows up as a different number. This page works out twelve kinds from the same input.

Which checksum should I use?

Use the one your format or protocol names. CRC-32 and Adler-32 are the usual choices for files and compressed streams, CRC-16 variants appear in serial links, and a plain sum is the weakest.

Why does my CRC not match another program?

The settings differ: polynomial, start value, bit order or final XOR. Check the string 123456789: CRC-32 must give cbf43926, CRC-16/MODBUS 4b37.

Can I verify a downloaded file with a checksum?

Yes. Choose A file, then compare the result with the published value. For protection against deliberate changes the publisher should offer a cryptographic hash such as SHA-256.

Is a checksum the same as a hash?

Both reduce data to a short value. A cryptographic hash is built so that finding two inputs with the same value is infeasible, while a checksum only has to catch accidental errors.

Is my file uploaded?

No. Text, bytes and files are read and processed by the script in this tab, and the page makes no network request with your data.

The tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations are checked against the tool's own output.