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.
Inputs
CRC Checksum (decimal)
—
Explain my result
Get a plain-English breakdown of your result with practical next steps.
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