CRC and checksums (Modbus CRC16, CRC32)

Paste the bytes of a frame to get its checksums and the frame with the CRC appended, ready to send over a serial port.

Checksums

Result

Modbus CRC160xCDC5
CRC bytes in the frame (low byte first)
C5 CD
Data bytes
6
Modbus RTU frame with CRC
01 03 00 00 00 0A C5 CD
Modbus ASCII frame with LRC
:01030000000AF2\r\n
Algorithmhexdecimal
CRC-16/MODBUS0xCDC552677
CRC-16/IBM-3740 (CCITT-FALSE)0x04281064
CRC-16/XMODEM0x0A382616
CRC-16/KERMIT0xB6BD46781
CRC-16/ARC0xD6C554981
CRC-32 (ISO-HDLC)0xDDEBE1C83723223496
CRC-32C (Castagnoli)0x9BCB8F5F2613808991
CRC-8/SMBUS0xB9185
LRC (Modbus ASCII)0xF2242
XOR (BCC)0x088
Sum mod 2560x0E14
Sum mod 655360x000E14

Modbus RTU sends the CRC at the end of the frame, low byte first. Algorithm parameters follow the CRC RevEng catalogue.

Embed on your site

Paste this code into your page’s HTML. The tool sets its own height, and the link to Kalkio has to stay visible.

Calculator by Kalkio · kalkio.app

CRC in Modbus RTU

Modbus RTU uses CRC-16/MODBUS: polynomial 0x8005 in reflected form (0xA001), initial value 0xFFFF. The two CRC bytes go at the end of the frame, low byte first. Example: reading 10 registers from address 0 of device 1 is 01 03 00 00 00 0A; its CRC is 0xCDC5, so the frame ends with C5 CD.

LRC in Modbus ASCII

Modbus ASCII uses an LRC instead: the sum of the address, function and data bytes modulo 256, negated (two’s complement). The frame starts with a colon, carries the bytes as hex characters and ends with CR LF.

Which CRC?

If a device manual only says “CRC16”, compare against a known frame: different CRC-16 variants give different results for the same data. The standard check for any algorithm is its result for the text “123456789”, e.g. 0x4B37 for CRC-16/MODBUS and 0xCBF43926 for CRC-32.

Need more?

Kalkio covers what is needed most often. For more advanced work we recommend:

Common questions

Why is my CRC byte order reversed?

Modbus RTU sends the CRC low byte first. The value 0xCDC5 goes into the frame as C5 CD. The calculator shows both.

Should the device address be part of the data?

Yes. The CRC covers the whole frame: device address, function code and data, without the CRC bytes themselves.