terican

Last verified · v1.0

Calculator · math

Crc Checksum Calculator

Compute CRC-8, CRC-16, CRC-32, and CRC-32C checksums from any integer input. Supports multiple polynomial variants for networking, storage, and embedded use.

FreeInstantNo signupOpen source

Inputs

CRC Checksum (decimal)

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

CRC Checksum (decimal)

The formula

How the
result is
computed.

What Is a CRC Checksum?

A Cyclic Redundancy Check (CRC) is an error-detecting code that verifies data integrity during storage and transmission. By treating a block of data as a polynomial over GF(2) — the two-element Galois field — and dividing it by a fixed generator polynomial, the algorithm produces a short fixed-length checksum. Any single-bit or burst error in the data changes the checksum, alerting the receiver to corruption without requiring retransmission of the original data.

The CRC Formula Explained

The mathematical core of every CRC computation is polynomial division in GF(2):

CRC(x) = xn · M(x) mod G(x)

  • M(x) — the message polynomial, formed by treating the input byte string as coefficients of a binary polynomial (each bit is a coefficient of 0 or 1).
  • G(x) — the generator (divisor) polynomial, chosen for its error-detection strength. Its degree n is the width of the CRC output in bits.
  • xn · M(x) — the message shifted left by n bits, making room for the n-bit remainder that becomes the checksum.
  • mod G(x) — polynomial modulo in GF(2), implemented as XOR-based long division. The n-bit remainder is the final CRC value.

Big-Endian Input Representation

This CRC calculator accepts a non-negative integer and interprets it as a big-endian byte sequence before computing the checksum. For example, the integer 0x48656C6C6F (decimal 313,532,612,207) maps to the ASCII bytes 48 65 6C 6C 6F — the string "Hello" — and produces a CRC-32 value of 0xF7D18982. Leading zeros in the byte representation are preserved, so 0x0102 (2 bytes) is treated differently from 0x102 (2 bytes, same value but the representation stays consistent with the integer width).

CRC Variants and Their Parameters

Beyond the generator polynomial, each CRC variant defines four additional parameters that fully specify its behavior:

  • Initial value (Init) — the starting contents of the shift register, commonly 0x00 or all-ones (e.g., 0xFFFFFFFF for CRC-32).
  • Input reflection (RefIn) — when true, each input byte is bit-reversed before processing (LSB becomes MSB).
  • Output reflection (RefOut) — when true, the final register value is bit-reversed before the XorOut step.
  • Final XOR (XorOut) — a constant XOR-ed with the (possibly reflected) output to yield the final checksum.

The most widely deployed CRC variants include:

  • CRC-8 — polynomial 0x07, Init 0x00, no reflection. Used in Dallas 1-Wire, SMBus, and ATM header error control.
  • CRC-16/CCITT — polynomial 0x1021, Init 0xFFFF, no reflection. Standard in X.25, HDLC, SD cards, and Bluetooth Low Energy.
  • CRC-32 — polynomial 0x04C11DB7, Init 0xFFFFFFFF, full reflection, XorOut 0xFFFFFFFF. Mandated by IEEE 802.3 Ethernet and embedded in ZIP, gzip, and PNG files.
  • CRC-32C (Castagnoli) — polynomial 0x1EDC6F41, full reflection. Superior Hamming distance at practical packet sizes; used in iSCSI, SCTP, and Linux ext4.

How Software Implements CRC Efficiently

Bit-by-bit polynomial division is too slow for modern data rates. Practical implementations use a precomputed 256-entry lookup table: for each input byte, one XOR operation and one table lookup advance the shift register. This reduces CRC-32 computation to roughly one clock cycle per byte on modern CPUs. Intel SSE4.2 introduced a dedicated hardware instruction that accelerates CRC-32C to sub-nanosecond throughput, as described in detail by the IEEE Micro tutorial on CRC computations.

Error Detection Capability

According to Koopman and Chakravarty (FAA TC-14-49, 2015), a properly chosen 32-bit CRC detects:

  • All single-bit and double-bit errors for any message length.
  • All burst errors of 32 bits or fewer in length.
  • All odd numbers of bit errors when the generator polynomial includes the factor (x+1).
  • Random errors with a residual miss probability of only 2−32 ≈ 2.33 × 10−10.

Practical Applications

  • Networking: Ethernet (CRC-32), Wi-Fi 802.11 (CRC-32), Bluetooth (CRC-16/CCITT), CANbus (CRC-15).
  • File integrity: ZIP, gzip, PNG, and PDF all embed a CRC-32 field to detect storage or download corruption.
  • Storage: Hard drives and SSDs use CRC-16 or CRC-32 in sector headers and ECC metadata.
  • Embedded firmware: Bootloaders verify firmware images with CRC-32 before writing to flash.
  • Serial protocols: Modbus RTU appends CRC-16 to every frame; XModem file transfer uses CRC-16/CCITT.

Reference

Frequently asked questions

What is a CRC checksum and how does it work?
A CRC (Cyclic Redundancy Check) checksum is a short fixed-length value computed from a data block using polynomial division over GF(2). The sender appends the CRC to the transmitted data; the receiver recalculates it independently and compares results. A mismatch signals data corruption. CRC-32 produces a 4-byte checksum that detects all single-bit errors and all burst errors up to 32 bits long, with a false-pass probability of approximately 1 in 4 billion.
What is the difference between CRC-8, CRC-16, and CRC-32?
The number in the name equals the degree of the generator polynomial, which also determines the checksum width in bits. CRC-8 outputs 1 byte and suits short messages such as 1-Wire or SMBus packets. CRC-16 outputs 2 bytes and appears in Modbus RTU and Bluetooth protocols. CRC-32 outputs 4 bytes and is the standard for Ethernet frames, ZIP archives, and PNG images. Wider checksums detect longer burst errors and deliver exponentially lower false-positive rates.
What is input/output reflection (RefIn and RefOut) in CRC algorithms?
Reflection reverses the bit order of a value. When RefIn is true, each input byte is bit-reversed before entering the shift register — bit 0 becomes bit 7 and vice versa. When RefOut is true, the final register value is bit-reversed before the XorOut step is applied. Both flags exist for historical compatibility with early UART hardware that shifted the LSB first. CRC-32 and CRC-16/IBM enable full reflection; CRC-16/CCITT uses neither.
Is CRC the same as a cryptographic hash like MD5 or SHA-256?
No. CRC is designed exclusively for accidental error detection, not security. Because CRC is a linear function over GF(2), an attacker who controls the input data can trivially craft a modified message that produces any desired CRC value. Cryptographic hashes like SHA-256 are computationally infeasible to reverse or collide intentionally. Use CRC to detect transmission errors or storage corruption; use SHA-256 or SHA-3 whenever tamper-detection or data authenticity is a requirement.
How do I verify a file's CRC-32 checksum using this calculator?
Obtain the raw bytes of the file as a hexadecimal integer — most hex editors display the full byte sequence — then paste that value into the Input Value field and select CRC-32 as the variant. Click Calculate and compare the result against the publisher's listed CRC-32. On Linux or macOS, running python3 with the binascii.crc32() function computes the identical value directly from the file path, providing a fast cross-verification without any extra tools.
Which CRC variant should be used for new embedded or network projects?
For new designs, the FAA-published research by Koopman and Chakravarty recommends CRC-32C (Castagnoli, polynomial 0x1EDC6F41). It outperforms standard CRC-32 in Hamming distance across common packet sizes of 64 to 1500 bytes, is natively accelerated by the Intel SSE4.2 CRC32 instruction and ARM CRC extensions, and is already mandated by the SCTP and iSCSI standards. For 8-bit microcontrollers where a 4-byte overhead is prohibitive, CRC-16/CCITT is the next best choice.