RS-485 · MODBUS RTU · POLYNOMIAL 0xA001

Modbus RTU CRC-16 Calculator

Generate Modbus RTU CRC-16 checksums in exact Lo-Byte / Hi-Byte serial wire order, build test frames for Function Codes 03/06/16, or validate captured RS-485 packets.

Modbus RTU PDU / ADU Hex Input

Enter Slave ID + Function Code + Data bytes in hex (without CRC, or paste a full captured frame to verify)

Quick Function Code Frame Presets

Slave 1, Function 03, Start 0x0000, Qty 10 → CRC C5 CD

Accepts space-separated (01 03 00 00 00 0A), comma/0x-prefixed, or continuous hex strings.

Modbus RTU Wire Order (Lo-Byte First)
C5 CD(CRC Lo: C5 · CRC Hi: CD)
16-Bit Register Hex0xCDC5
Unsigned Decimal52677
Complete Transmit Frame (8 Bytes)
01030000000AC5CD
Decoded Slave Address
Node 1 (0x01)
Decoded Function Code
FC03 Read Holding Registers

IEC 61131-3 Structured Text CRC-16 Implementation

CRC := 16#FFFF;
FOR idx := 0 TO FrameLen - 1 DO
    CRC := CRC XOR BYTE_TO_WORD(Buffer[idx]);
    FOR bit := 0 TO 7 DO
        IF (CRC AND 16#0001) <> 0 THEN
            CRC := SHR(CRC, 1) XOR 16#A001;
        ELSE
            CRC := SHR(CRC, 1);
        END_IF;
    END_FOR;
END_FOR;
CRC_Lo := WORD_TO_BYTE(CRC AND 16#00FF);
CRC_Hi := WORD_TO_BYTE(SHR(CRC, 8));

Frequently Asked Questions

Why are the two CRC-16 bytes reversed on a Modbus RTU RS-485 wire?+

While Modbus register payloads (such as 16-bit Holding Registers) are transmitted Big-Endian (High Byte first), the Modbus over Serial Line specification mandates that the 16-bit CRC checksum be appended Little-Endian: Low-Order Byte first, followed by the High-Order Byte. For example, CRC value 0xCDC5 is transmitted on the wire as C5 CD.

What polynomial and initial value does Modbus RTU CRC-16 use?+

Modbus RTU initializes the 16-bit CRC register to 0xFFFF and shifts right bit-by-bit using the reflected polynomial 0xA001 (the bit-reversal of 0x8005), with no final XOR.

How can I verify a complete Modbus RTU frame captured from a serial sniffer?+

Paste the entire captured frame—including its trailing two CRC bytes—directly into the calculator. Running the reflected CRC-16 algorithm across a valid message plus its Lo/Hi CRC bytes always yields a residual of 0x0000.

Does Modbus TCP use a CRC-16 checksum?+

No. Modbus TCP encapsulates the Modbus PDU inside a standard TCP/IP packet with a 7-byte MBAP header and relies on Ethernet FCS and TCP checksums instead of appending a 2-byte RTU CRC.

12 Free Browser-Based Engineering Utilities

Complete PLC & Industrial Automation Calculator Suite