Paste the bytes of a serial or embedded protocol frame as hex, decimal or ASCII text and get every common simple checksum at once, with the one your protocol uses shown large and worked out step by step.
Last updated:
Hex: 01 03 0A, 0x01,0x03 or 01030A. ASCII: use \r \n \t \0 and \xHH for control bytes.
e.g. 1 to leave out an STX or ':' start byte
e.g. leave out an existing checksum or ETX
Enter your values to see the result.
Advertisement
Advertisement
How to use the Checksum Calculator
Choose the input format: hex bytes, ASCII text, decimal bytes or NMEA sentences.
Pick the checksum your protocol uses as the main result.
Paste the data and, if needed, skip framing bytes at the start or end.
Click Calculate (results also update as you type).
Compare the result with your device's value using the byte table and running totals.
Simple checksums compared
Checksum
Formula
Size
Typical use
8-bit sum
sum of bytes mod 256
1 byte
Simple serial devices, Intel HEX uses its two's complement
Two's complement (LRC)
(256 − sum mod 256) mod 256
1 byte
Modbus ASCII, Intel HEX records
One's complement
0xFF − (sum mod 256)
1 byte
Some sensor and RC protocols
XOR / BCC
b1 ⊕ b2 ⊕ … ⊕ bn
1 byte
Card readers, PLC and industrial links, many STX…ETX frames
NMEA 0183
XOR of characters between $ and *
2 hex chars
GPS receivers, marine electronics
Fletcher-16
two running sums mod 255
2 bytes
Lightweight links where order errors matter
Internet checksum
one's complement of 16-bit word sum
2 bytes
IPv4, ICMP, UDP and TCP headers
Adler-32
two sums mod 65521
4 bytes
zlib data streams
Worked example: Modbus ASCII LRC
Message bytes 11 03 00 6B 00 03: 0x11 + 0x03 + 0x00 + 0x6B + 0x00 + 0x03 = 0x82. The two's complement is 0x100 − 0x82 = 0x7E, so the ASCII frame is :1103006B00037E followed by CR LF. The receiver adds all bytes including 0x7E and gets 0x00.
Tips for debugging a checksum
Most mismatches come from the range: is the start byte (STX, ':' or '$') included? Is the checksum computed before or after escaping or ASCII encoding?
For ASCII-hex protocols such as Modbus ASCII, compute over the decoded bytes (11 03 …), not over the characters "1", "1", "0", "3".
Two-byte checksums can be sent high byte first or low byte first. If yours looks right but reversed, see the Endianness Converter.
If your protocol names a polynomial (0x8005, 0x1021, 0x04C11DB7), it uses a CRC, not a simple checksum.
Frequently asked questions
What is an 8-bit checksum?
Add all the bytes together and keep only the lowest 8 bits (the sum modulo 256). Many protocols send this sum, its two's complement or its one's complement as the last byte of a message.
How is the Modbus ASCII LRC calculated?
Add the bytes of the message (address, function code and data, not the colon or CR LF) modulo 256, then take the two's complement: (256 − sum) mod 256. For 11 03 00 6B 00 03 the sum is 0x82, so the LRC is 0x7E.
What is the difference between LRC and BCC?
Both names are used loosely. BCC (block check character) is usually the XOR of all bytes. LRC can mean that same XOR or, as in Modbus ASCII, the two's complement of the 8-bit sum. Check your protocol document for which one it means.
How do I calculate an NMEA checksum?
XOR the ASCII codes of every character between the $ (or !) and the asterisk, then write the result as two uppercase hex digits after the asterisk, such as *47.
Why do receivers add the checksum to the data?
With a two's complement checksum the sum of all bytes including the checksum is 0 modulo 256; with XOR the XOR of everything is 0; with a one's complement the sum is 0xFF. Testing for that constant is a quick way to check a frame.
Is a simple checksum as good as a CRC?
No. Sums and XOR miss errors such as reordered bytes and some multi-bit errors. A CRC detects far more error patterns, which is why most newer protocols use CRC-16 or CRC-32.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.