CRC Calculator

Checksum Calculator

Type text, paste hex bytes or pick a file to see every common checksum at once — simple sums and XOR, Fletcher and Adler, CRC-8 to CRC-64, and the MD5 and SHA hashes. Use it to find out which checksum a device or file format is using.

9 bytes

Text is encoded as UTF-8.

Checksums hexadecimal

Simple checksums

Sum-8sum of bytes mod 256
dd
LRC (two's complement)Modbus ASCII, Intel HEX
23
XOR-8 (BCC)NMEA 0183, serial protocols
31
Sum-16sum of bytes mod 65536
01dd
Sum-32sum of bytes mod 2^32
000001dd
Internet checksumRFC 1071 — IPv4, TCP, UDP, ICMP
f62a
Fletcher-16position-sensitive sum
1ede
Adler-32zlib streams
091e01de

CRC

CRC-8SMBus, sensors
f4
CRC-16CRC-16/ARC (IBM)
bb3d
CRC-16/CCITTCCITT-FALSE variant
29b1
CRC-16/MODBUSModbus RTU
4b37
CRC-32ZIP, gzip, PNG, Ethernet
cbf43926
CRC-32CiSCSI, ext4, cloud storage
e3069283
CRC-64CRC-64/XZ
995dc9bbdf1939fa

Cryptographic hashes

MD5legacy, not collision-resistant
25f9e794323b453885f5181f1b624d0b
SHA-1legacy, Git object IDs
f7c3bc1d808e04732adf679965ccc34ca7ae3441
SHA-256current standard
15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225

What a checksum is for

Data gets damaged: a bit flips on a serial line, a download is cut short, a flash cell wears out. A checksum is the cheapest way to notice. The sender computes a short value from the data and attaches it; the receiver computes it again and compares. A mismatch means the data cannot be trusted. A match means it is very probably intact — how probably depends on the algorithm.

The algorithms differ in how many errors they catch, how long the result is, and whether they hold up against someone changing the data deliberately.

Checksum algorithms compared

AlgorithmSizeCatchesMissesTypical use
Sum-8 / LRC8 bitsAny single-bit errorSwapped bytes, errors that cancel outIntel HEX, Modbus ASCII, simple serial frames
XOR-8 (BCC)8 bitsAny single-bit errorSwapped bytes, two errors in the same bit columnNMEA 0183 GPS sentences
Internet checksum16 bitsMost random errorsSwapped 16-bit wordsIPv4, TCP, UDP headers
Fletcher-1616 bitsReordered bytes tooCannot tell 0x00 from 0xFFEmbedded protocols, OSI transport
Adler-3232 bitsReordered bytesWeak on inputs shorter than a few hundred byteszlib
CRC-1616 bitsAll bursts up to 16 bits1 in 65,536 of other errorsModbus, USB, XMODEM
CRC-3232 bitsAll bursts up to 32 bits1 in 4.3 billion of other errorsZIP, PNG, Ethernet
MD5128 bitsAll accidental errorsDeliberate collisionsLegacy download checks
SHA-256256 bitsAccidental and deliberate changes—Software releases, signatures

Working out a simple checksum by hand

Take the four bytes 01 03 00 0A.

  • Sum-8: 0x01 + 0x03 + 0x00 + 0x0A = 0x0E.
  • LRC: the two's complement of that sum, 0x100 − 0x0E = 0xF2. Adding it to the data makes the total come out as zero, which is how the receiver checks it.
  • XOR: 0x01 ^ 0x03 ^ 0x00 ^ 0x0A = 0x08.

Paste those bytes into the calculator in Hex mode to confirm. Sums and XOR are easy to compute but blind to reordering: 01 03 and 03 01 give the same result. That weakness is why most protocols moved to CRCs.

Finding out which checksum a device uses

  1. Capture a message together with its checksum bytes.
  2. Paste the message without the checksum into Hex mode.
  3. Look for the captured value in the results. With a 16-bit value, try both byte orders.
  4. No match? The checksum may cover fewer bytes than you think — drop the start-of-frame byte or the address and try again. If it looks like a CRC, the CRC32 calculator lists 100 CRC variants for the same input, and the CRC16 calculator and CRC8 calculator narrow it down by width.

Frequently asked questions

What is a checksum?

A checksum is a small value computed from a block of data and stored or sent along with it. Whoever receives the data repeats the computation; if the two values differ, the data was changed on the way. Checksums range from a one-byte sum to a 256-bit cryptographic hash.

How do I calculate a checksum by hand?

For the simplest kind, add all the bytes together and keep only the lowest eight bits. For the ASCII text "123456789" the byte values add up to 477, or 0x1DD, so the 8-bit checksum is 0xDD. Protocols that want the total to come out as zero send the two's complement instead: 0x100 − 0xDD = 0x23.

Which checksum should I use?

If you are implementing an existing protocol or file format, use exactly the one it specifies. For a new design: CRC-32 or CRC-32C to catch accidental corruption, CRC-64 for very large objects, and SHA-256 whenever someone might change the data on purpose.

What is the difference between a checksum, a CRC and a hash?

A checksum is the general term. A CRC is a particular kind of checksum based on polynomial division, much better than a plain sum at catching reordered and burst errors. A cryptographic hash such as SHA-256 is designed so that nobody can construct two inputs with the same value; it is slower and longer, and it is the only one of the three that protects against deliberate tampering.

Why do two tools give different checksums for the same text?

Either they use different algorithms under the same name ("CRC-16" covers dozens of variants), or they are not hashing the same bytes: a trailing newline, Windows versus Unix line endings, or a different text encoding all change the result. In Hex mode you control the exact bytes.

Can a checksum be wrong even though the data is fine?

Only if the checksum itself was damaged or was computed over a different range of bytes than you assumed — for example with or without a header. The algorithm is deterministic: the same bytes always give the same checksum.