CRC Calculator
Result
Algorithm Reference
Result is calculated from the current input. Check is the published verification value for the standard input 123456789. RefIn and RefOut are separate input and output reflection settings. Click a row to apply that algorithm; on narrow screens, the chevron button at the end of a row reveals its full parameters.
CRC Lookup Table
CRC Source Code
/*
* Model: CRC-16 / MODBUS (16-bit)
* Poly: 0x8005, Init: 0xFFFF, XorOut: 0x0000
* CRC Table C Source Code & Lookup Table Generator
*/
#include <stdint.h>
#include <stddef.h>
const uint16_t crc_table[256] = {
0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,
0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,
0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,
0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,
0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,
0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,
0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,
0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,
0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,
0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,
0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,
0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,
0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,
0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,
0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,
0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,
0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,
0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,
0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,
0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,
0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,
0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,
0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,
0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,
0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,
0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,
0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,
0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,
0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,
0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
};
uint16_t calculate_crc(const uint8_t *data, size_t length) {
uint16_t crc = 0xFFFF;
for (size_t i = 0; i < length; i++) {
#if 1
uint8_t idx = (uint8_t)(crc ^ data[i]);
crc = (crc >> 8) ^ crc_table[idx];
#else
uint8_t idx = (uint8_t)((crc >> 8) ^ data[i]);
crc = (crc << 8) ^ crc_table[idx];
#endif
}
return crc ^ 0x0000;
}CRC Algorithm Identifier
Already know the CRC output for this data but not which algorithm produced it? Enter the known result below — every one of the 70 catalog algorithms is recalculated against the current input data and matched against it automatically.
Enter a known CRC value to search the catalog
All 70 algorithms are checked against the current input data.
CRC Patch Finder
Why CRC Calc
A CRC (cyclic redundancy check) is an error-detection method used to verify data integrity. CRC Calc lets you calculate CRC-8, CRC-16, CRC-32, CRC-64, and CRC32C checksums, generate lookup tables and source code, find patch bytes for a target CRC, and identify unknown algorithms — entirely in your browser. It's a focused toolkit built for the exact question engineers ask a dozen times a day: what checksum does this data produce under a specific CRC model? Rather than bundling a general-purpose hashing utility with CRC as an afterthought, every part of this site — the calculator, the 70-algorithm catalog, the lookup table and code generators, the patch finder, and the algorithm identifier — is built around the parameters that actually define a CRC: width, polynomial, initial value, input and output reflection, and final XOR.
Everything runs entirely in your browser. Text, hex, decimal, binary, Base64, and uploaded files are parsed and processed on your device; nothing is transmitted to a server, logged, or stored, which makes the tool safe to use with proprietary protocol data or firmware images. The algorithm catalog documents published parameters and check values for well-known CRC-8, CRC-16, CRC-32, and CRC-64 variants — from MODBUS and XMODEM to Ethernet's CRC-32/ISO-HDLC — so you can confirm you're matching an existing implementation rather than guessing at undocumented defaults.
Use the calculator to verify a single value, or the Algorithm Reference table to see how the same input behaves across every preset at once. The lookup table and code generator turn that same configuration into a precomputed table or a ready-to-paste C, Python, or JavaScript implementation; the patch finder brute-forces the two bytes that make patched data hit a specific target CRC; and the identifier works backward from data and a known result to name which of the 70 catalog algorithms produced it. Whether you're debugging a mismatched checksum, forcing a checksum for testing, or reverse engineering an unknown protocol, CRC Calc aims to answer the question directly instead of sending you back to a spec sheet.
Supported CRC parameters
Custom CRC calculations can be configured using width, polynomial, initial value, input reflection, output reflection, and final XOR value. These parameters allow the calculator to reproduce many standard and proprietary CRC implementations used in embedded systems, serial communication, industrial protocols, file formats, and network applications.
- Width
- Defines the CRC register size, such as 8, 16, or 32 bits.
- Polynomial
- Specifies the generator polynomial used by the CRC algorithm.
- Initial value
- Sets the value loaded into the CRC register before processing data.
- RefIn and RefOut
- Control whether input bytes and the final CRC result are reflected.
- Final XOR value
- Applies a final XOR operation to the CRC register before displaying the checksum.
CRC-8, CRC-16, CRC-32, and CRC-64
CRC-8 produces an 8-bit checksum and is commonly used in compact embedded and sensor protocols. CRC-16 produces a 16-bit checksum and is widely used by protocols such as Modbus, XMODEM, and CCITT-based communication systems. CRC-32 produces a 32-bit checksum and provides stronger error detection for larger files, archives, Ethernet frames, and storage formats. CRC-64 produces a 64-bit checksum used where an even lower collision probability matters, such as .xz archives, Redis, and large-file integrity checks.
CRC lookup table and source code generator
A CRC lookup table replaces repeated bit-by-bit polynomial operations with precomputed values. This can significantly improve checksum performance in firmware, embedded software, and high-throughput applications. The generated table and function code can be copied directly into C, Python, or JavaScript projects and adapted as needed.
CRC patch finder
The patch finder brute-forces the two-byte value that, inserted or appended at a chosen offset, makes the CRC of the patched data equal a target you specify. This is useful when a save file, firmware image, or other checksummed format rejects an edit because its stored CRC no longer matches — appending the found bytes restores a valid checksum without needing to reverse the CRC algorithm by hand.
CRC algorithm identifier
The identifier works in the opposite direction: given input data and a CRC result you already have, it checks that pair against all 70 catalog algorithms and reports every one that reproduces the result. This helps when a protocol or file format's documentation doesn't state which CRC variant it uses, since matching width and polynomial alone is not enough to confirm the model.
Frequently asked questions
What is a CRC checksum?
A cyclic redundancy check, or CRC, is an error-detection method used to identify accidental changes in transmitted or stored data. The sender calculates a CRC value, and the receiver calculates it again to verify that the data has not been corrupted.
Which CRC algorithm should I use?
Use the algorithm required by your protocol or file format. For example, Modbus commonly uses CRC-16/MODBUS, while other systems may require CCITT-FALSE, XMODEM, KERMIT, CRC-32, or a custom parameter set.
Why do CRC calculators sometimes return different results?
CRC results depend on more than the polynomial. Width, initial value, input reflection, output reflection, final XOR value, input encoding, and byte order must all match. A difference in any one of these settings can produce a different checksum.
Can I calculate the CRC of a binary file?
Yes. Select the file input option and choose a binary file. The calculator reads the file as bytes and computes the selected CRC directly in your browser.
Are uploaded files sent to a server?
No. CRC calculations and file processing are performed locally in the browser. Your files and input data are not uploaded to the website server. There is no fixed upload size limit — a file is read entirely into your browser's memory before it's checksummed, so very large files are limited by your device's available memory rather than by the tool itself.
What is the standard CRC check value for 123456789?
The ASCII string 123456789 is commonly used as a standard CRC test input. The expected result depends on the selected algorithm. For example, CRC-32/ISO-HDLC produces 0xCBF43926, CRC-16/MODBUS produces 0x4B37, and CRC-64/XZ produces 0x995DC9BBDF1939FA.
Why is CRC-16/CCITT confusing?
"CRC-16/CCITT" is not one algorithm — different tools and documents use the name for several distinct parameter sets that all share the 0x1021 polynomial but disagree on initial value and reflection. CRC-16/KERMIT uses initial value 0x0000 with both input and output reflected, while CRC-16/CCITT-FALSE (also called CRC-16/IBM-3740) uses initial value 0xFFFF with no reflection at all. The two produce different results for identical input, so always confirm which specific variant a spec means rather than assuming "CCITT" identifies a single checksum.
What's the difference between CRC-32 and CRC-32/MPEG-2?
Both use the same 0x04C11DB7 polynomial and initial value 0xFFFFFFFF, but they diverge everywhere else. CRC-32/ISO-HDLC (the "plain" CRC-32 used by Ethernet, ZIP, and PNG) reflects both input and output and applies a final XOR of 0xFFFFFFFF. CRC-32/MPEG-2 uses no reflection and no final XOR at all. Because the reflection settings differ, the two are not related by a simple byte swap — they require separate implementations, and a value valid under one will not validate under the other.
When should I use CRC-64?
Reach for CRC-64 when a 32-bit checksum's collision probability becomes a real risk — very large files, long-lived archives, or high-volume storage systems, where doubling the checksum width meaningfully reduces the chance of an undetected multi-bit error. Use the variant a target format actually specifies: CRC-64/XZ for .xz archives, CRC-64/MS for .cab files, CRC-64/REDIS for Redis Cluster and RDB files, or CRC-64/NVME for NVMe storage protection.
What's the difference between CRC32C and regular CRC-32?
CRC32C (catalogued here as CRC-32/ISCSI, also known as CRC-32/Castagnoli) uses a different generator polynomial, 0x1EDC6F41, than the 0x04C11DB7 polynomial behind the common CRC-32/ISO-HDLC. The Castagnoli polynomial has stronger burst-error detection at typical storage and network block sizes and has hardware acceleration on modern CPUs, which is why iSCSI, SCTP, and several NVMe transports use it instead of the Ethernet-style CRC-32.
CRC Algorithm Quick Reference
A quick reference for the algorithm a given protocol or use case typically expects.
| Use case | Recommended algorithm |
|---|---|
| Ethernet frames, ZIP, PNG, gzip | CRC-32/ISO-HDLC |
| Modbus RTU | CRC-16/MODBUS |
| USB packets | CRC-16/USB |
| Bluetooth packet header | CRC-8/BLUETOOTH |
| Bluetooth / XMODEM-style link layer | CRC-16/KERMIT |
| iSCSI, SCTP, NVMe transport | CRC-32/ISCSI (CRC32C) |
| MPEG-2 transport streams | CRC-32/MPEG-2 |
| AUTOSAR E2E (8-bit signals) | CRC-8/AUTOSAR |
| AUTOSAR E2E (32-bit PDUs) | CRC-32/AUTOSAR |
| Large files / archives / databases | CRC-64/XZ or CRC-64/WE |