CRC-16/Modbus in one sentence
CRC-16/Modbus is the cyclic redundancy check that every Modbus RTU device computes over a message frame to detect transmission errors before acting on it.
How it works
The algorithm processes the message one byte at a time using the reflected generator polynomial 0xA001. The CRC register starts at 0xFFFF. For each input byte, the byte is XORed into the low byte of the register, and the register is shifted right eight times; whenever a bit shifted out is 1, the polynomial 0xA001 is XORed back in. Because the input and output are reflected, the calculation is done least-significant-bit first. There is no final XOR step, so the register value after the last byte is the CRC.
This tool uses the standard table-driven form: it precomputes a 256-entry lookup table from the polynomial, then folds each byte through the table. That produces the same result as the bitwise method but far faster.
Example and notes
The Modbus specification’s canonical test vector is the ASCII string 123456789, which must yield 0x4B37. You can paste either text or raw hex — for a real frame such as a read-holding-registers request, switch to Hex bytes and paste the address, function code, and data.
When you transmit the frame, remember Modbus RTU is unusual: it appends the CRC low byte first, then the high byte. The tool shows both the natural hex value and the on-the-wire byte order so you do not swap them by mistake. CRC checks catch accidental corruption only and are not a substitute for cryptographic integrity.