CRC Calculator
Compute CRC-8, CRC-16 (CCITT/IBM), and CRC-32 checksums on any hex data. Shows the full polynomial division and final remainder.
How to Use
- Enter the data as hex bytes, with or without spaces or 0x prefixes.
- Choose the CRC variant your protocol uses; the polynomial alone is not enough, because the initial value and bit order differ too.
- Read the CRC in hex and decimal, with the polynomial and the number of bytes.
- To check your own implementation, enter 31 32 33 34 35 36 37 38 39 ("123456789") and compare with the standard check value.
Worked Example
A Modbus RTU master asks device 1 for ten registers starting at 0: bytes 01 03 00 00 00 0A. With CRC-16/MODBUS (polynomial 0x8005, reflected, starting value 0xFFFF) the CRC is 0xCDC5. Modbus sends it low byte first, so the full frame is 01 03 00 00 00 0A C5 CD.
Checking an implementation: the bytes of "123456789" (31 32 … 39) give 4B37 for CRC-16/MODBUS, BB3D for CRC-16/ARC and CBF43926 for CRC-32, the published check values for those variants.
The common mistake: matching only the polynomial. ARC and Modbus both use 0x8005, but ARC starts from 0x0000 and gives 0xD6C5 for the same request, so every frame would fail its check.
Show Work: Parameters
Formulas: CRC Theory
History of Cyclic Redundancy Check
W. Wesley Peterson published the foundational CRC paper, "Cyclic Codes for Error Detection", with D. T. Brown in the Proceedings of the IRE in 1961. His key insight: treating the message and divisor as polynomials in GF(2) (binary arithmetic mod 2) produces a checksum with beautifully predictable error-detection properties — in particular, any burst error shorter than the CRC length is guaranteed to be caught, along with all single-bit errors, every odd number of bit errors when the polynomial has x + 1 as a factor, and the great majority of random errors.
Hardware implementation is trivially cheap: a shift register with XOR gate taps at positions corresponding to the polynomial coefficients. Early telecom equipment implemented CRC in dedicated logic; modern systems use either table-lookup (fast on CPUs) or dedicated hardware (built into every Ethernet PHY). Carry-less multiply instructions such as x86's PCLMULQDQ, introduced around 2010, make software CRCs very fast.
A handful of polynomials cover most uses, each with several variants: 0x07 for SMBus packet error checking, 0x31 (reflected) for Maxim 1-Wire, 0x1021 for XMODEM and the CCITT family, 0x8005 for ARC and Modbus, and 0x04C11DB7 for CRC-32 in Ethernet, ZIP and PNG. Each polynomial was selected to maximize error detection over expected burst lengths while remaining hardware-efficient. New applications still typically pick one of these standard polynomials rather than design custom ones.
About This Calculator
Enter hex data (with or without 0x prefix, and optional whitespace) and pick a CRC variant. The tool performs bitwise polynomial division and returns the CRC in hex and decimal, along with the polynomial and input length.
Important detail: full CRC specifications include initial value, XOR-out, bit reflection (input and output), and polynomial — this calculator uses the standard defaults for each variant. If your target system uses non-standard parameters (some embedded protocols reflect differently or use unusual init values), verify against a known-good reference implementation for that system. All math runs client-side; no data leaves your browser.
Frequently Asked Questions
What is a CRC?
A cyclic redundancy check: the remainder of dividing the data, treated as a long binary polynomial, by a fixed generator polynomial. It catches every burst of errors no longer than the CRC itself and almost all other accidental corruption, and is cheap in hardware.
Why do two CRC-16s give different answers for the same data?
A CRC is defined by more than its polynomial: the starting value, whether bits are processed least-significant first (reflected), and a final XOR. CRC-16/ARC and CRC-16/MODBUS share polynomial 0x8005 but start at 0x0000 and 0xFFFF, so "123456789" gives BB3D and 4B37.
Which variant does my protocol use?
SMBus packet error checking uses CRC-8/SMBUS; Maxim 1-Wire uses CRC-8/MAXIM; XMODEM uses CRC-16/XMODEM; Modbus RTU uses CRC-16/MODBUS; Ethernet, ZIP, PNG and gzip use CRC-32. Always confirm against the protocol's specification or a known-good frame.
In which order are the CRC bytes sent?
It depends on the protocol. Modbus sends the low byte first: the request 01 03 00 00 00 0A has CRC 0xCDC5 and goes on the wire as C5 CD.
Can a CRC protect against tampering?
No. It detects accidental errors, but anyone can change the data and recompute a matching CRC. Use a cryptographic hash or a MAC where tampering matters.
How do I use the CRC Calculator?
Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Modbus RTU Frames
Every Modbus RTU message ends with a CRC-16/MODBUS; 01 03 00 00 00 0A ends with C5 CD.
Checking Your Own Code
Run "123456789" through your implementation: CRC-32 must give CBF43926, CRC-16/CCITT-FALSE 29B1 and CRC-8/SMBUS F4.
File Formats
ZIP, gzip and PNG store a CRC-32 of the data, so a corrupted file is detected when it is opened.
Network Frames
Ethernet appends a CRC-32 frame check sequence, recomputed by the receiver to discard damaged frames.
Last updated: