How the calculation works
A CRC treats the message as a long binary number and divides it by a generator polynomial using XOR instead of subtraction. The remainder is the checksum. In practice, a register is loaded with an initial value, each input byte is XORed into it, and the register is shifted eight times. Whenever a 1 bit falls out of the register, the polynomial is XORed back in. After the last byte, some algorithms XOR the register with a final value.
The tool computes five algorithms in parallel and highlights the one you select. CRC-8 uses polynomial 0x07 with initial value 0x00, as in SMBus. CRC-16/XMODEM and CRC-16/CCITT-FALSE both use polynomial 0x1021 without bit reflection, but start from 0x0000 and 0xFFFF respectively. CRC-16-Modbus uses polynomial 0x8005 in reflected form (0xA001) with initial value 0xFFFF. CRC-32 uses the reflected polynomial 0xEDB88320, initial value 0xFFFFFFFF and final XOR 0xFFFFFFFF.
In ASCII mode, each character becomes one byte equal to the low 8 bits of its character code, so text is not UTF-8 encoded. A line break in the input box is also hashed, as byte 0x0A. In hex mode, "0x" prefixes and any non-hex characters such as spaces are ignored, and an odd number of hex digits is rejected. Custom polynomials, other initial values and Dallas 1-Wire CRC-8 are not supported.
Worked example
Inputs: ASCII mode with the text 123456789, the tool's default and the standard check string used to identify CRC variants.
- The text becomes nine bytes:
31 32 33 34 35 36 37 38 39.
- CRC-8, first byte: the register 0x00 XOR 0x31 gives 0x31.
- Eight shifts with polynomial 0x07 give the sequence 0x62, 0xC4, 0x8F, 0x19, 0x32, 0x64, 0xC8, 0x97. The XOR with 0x07 is applied after the shifts that push out a 1 bit.
- Repeating this for the remaining eight bytes gives a final CRC-8 of 0xF4.
- The same nine bytes give CRC-16/XMODEM 0x31C3, CRC-16/CCITT-FALSE 0x29B1, CRC-16-Modbus 0x4B37 and CRC-32 0xCBF43926.
Result: these are the published check values for these algorithms. If your firmware returns the same values for 123456789, its polynomial, initial value, reflection and final XOR all match. If only one value differs, compare the initial value and bit order first.
Frequently asked questions
Which CRC does Modbus use?
Modbus RTU uses CRC-16-Modbus: polynomial 0x8005 processed in reflected form, initial value 0xFFFF and no final XOR. The CRC is sent low byte first. For the request 01 03 00 00 00 01, the CRC is 0x0A84, so the frame ends with 84 0A. Running the CRC over the whole frame, including those two bytes, gives 0x0000.
Why does my CRC-16 not match another calculator?
"CRC-16" and "CCITT" are used for several different algorithms. CRC-16/XMODEM and CRC-16/CCITT-FALSE share polynomial 0x1021 but start from 0x0000 and 0xFFFF, so they give 0x31C3 and 0x29B1 for the check string. Other variants with the same polynomial use reflected bits. Compare the check value for 123456789 to identify which variant the other tool uses.
Is this CRC-32 the same as in zip and Ethernet?
Yes. The CRC-32 computed here is the common variant used in zip, gzip, PNG and the Ethernet frame check sequence, with check value 0xCBF43926. Other 32-bit CRCs, such as CRC-32C used in iSCSI and some storage systems, use a different polynomial and are not computed by this tool.
Does a trailing newline change the result?
Yes. In ASCII mode, every character in the input box is hashed, including spaces, tabs and line breaks. A newline adds byte 0x0A and changes every result. When you compare with firmware, make sure both sides hash exactly the same bytes. Hex mode is safer for binary frames, because spaces and separators are ignored.
Can a CRC protect firmware against tampering?
No. A CRC detects accidental errors such as noise, dropped bits or a corrupted flash write. It is not cryptographic. Anyone can modify the data and recompute a matching CRC. To verify that a firmware image is authentic, a bootloader needs a cryptographic hash combined with a digital signature, with the CRC kept only as a fast integrity check.