CRC and checksums, byte order and floats, Modbus frames — for embedded and IoT work
Every common CRC-8/16/32 and simple checksum at once — Modbus, CCITT, XMODEM, Dallas 1-Wire, Sensirion, Ethernet, STM32 — with the bytes in both orders, ready to append to a frame.
Paste 2, 4 or 8 bytes (or Modbus registers) to read them as int16/32/64 and float32/64 in every byte order — ABCD, DCBA, BADC, CDAB.
Type a value to get its bytes in each order, as a C array, and the IEEE 754 bit layout for floats.
Build a Modbus request with its CRC (RTU) or MBAP header (TCP), ready to send from a serial terminal or socket tool.
Addresses are 0-based protocol addresses: holding register 40001 is address 0.
Paste a request or response to check its CRC, name the exception code, and read the registers as int16, uint16 and float32.
A CRC (cyclic redundancy check) is the error-detection code at the end of most serial and radio frames. "CRC-16" alone is not enough to reproduce one: each variant has its own polynomial, start value, bit order and final XOR. If your result does not match a device, the variant is almost always the reason. This calculator runs all common variants at once so you can spot the one that matches.
Every CRC variant is defined with a check value — its result for the ASCII string 123456789. Click "Check string" in the tool to compare against your own implementation: CRC-16/MODBUS must give 0x4B37 and CRC-32 must give 0xCBF43926.
A 32-bit float or integer is four bytes, but devices disagree on their order. Naming the bytes A B C D from most to least significant:
If a reading looks like a tiny number such as 7.2e-41 or a huge one, the byte order is wrong — paste the bytes here and pick the row that makes sense.
A Modbus RTU request is the slave address, a function code, the data, and a CRC-16/MODBUS sent low byte first. Modbus TCP drops the CRC and the slave address moves into a 7-byte MBAP header: transaction ID, protocol ID (always 0), length, and unit ID.
Addresses in the frame are 0-based: holding register 40001 is address 0, 40010 is address 9. When a device answers with the function code plus 0x80 (for example 83), the next byte is an exception code — 02 "Illegal Data Address" usually means the register number is off by one or outside the device's map.
All calculations run in your browser. The frames and data you paste are never uploaded.