PortDock

CRC & Checksum Calculator

Compute CRC16 Modbus/CCITT/XMODEM, CRC8, LRC, BCC (XOR), SUM8 and SUM16 at once. HEX or ASCII (\r \n \xNN) input, shown in transmission byte order.

TypeChecksum (byte order)Body + checksum
CRC16 Modbus
Poly 0xA001 (reflected 0x8005), init 0xFFFF, low byte first
CRC16 CCITT
Poly 0x1021, init 0xFFFF, high byte first (CCITT-FALSE)
CRC16 XMODEM
Poly 0x1021, init 0x0000, high byte first
CRC8
Poly 0x07, init 0x00
LRC
Two's complement of the byte sum
BCC (XOR)
XOR of all bytes
SUM8
Byte sum, low 8 bits
SUM16
Byte sum, 16 bits, high byte first

Everything is computed in your browser; nothing you type is sent anywhere.

FAQ

Why is the Modbus RTU CRC byte order reversed?

Modbus RTU sends the low byte of the CRC16 first. The CRC of «01 03 00 00 00 0A» is 0xCDC5 and goes on the wire as «C5 CD».

My CRC16 CCITT differs from another calculator

CCITT has variants by initial value. «CRC16 CCITT» here uses init 0xFFFF (CCITT-FALSE) and «CRC16 XMODEM» uses 0x0000. Kermit is a bit-reversed variant.

Is LRC the same as Modbus ASCII LRC?

Same formula (two's complement of the byte sum) applied to raw bytes. For Modbus ASCII, convert the characters to bytes first.

To append and verify checksums while talking to a device, use PortDock Serial.