This tool computes a 16-bit CRC checksum of any text or raw hex bytes and shows it in hexadecimal and decimal, updating live. CRC-16 is the workhorse of serial and fieldbus protocols, offering much stronger accidental-error detection than an 8-bit CRC while staying compact.
How it works
CRC-16 computes the remainder of the input, viewed as a polynomial over GF(2), divided by the generator polynomial 0x1021 (x^16 + x^12 + x^5 + 1). This implementation uses the CRC-16/CCITT-FALSE configuration: a 256-entry table is built from the polynomial in the most-significant-bit-first direction, the running value is initialised to 0xFFFF, and for each byte the high byte of the CRC is XORed with the input to index the table — crc = (crc << 8) XOR table[(crc >> 8) XOR byte]. There is no reflection and no final XOR.
The CRC-16 variant landscape
The phrase “CRC-16” covers a family of related but incompatible checksums. The variants most likely to cause confusion are:
| Variant | Poly | Init | Reflected | Final XOR | Check value (123456789) |
|---|---|---|---|---|---|
| CRC-16/CCITT-FALSE | 0x1021 | 0xFFFF | No | 0x0000 | 0x29B1 |
| CRC-16/XMODEM | 0x1021 | 0x0000 | No | 0x0000 | 0x31C3 |
| CRC-16/MODBUS | 0x8005 | 0xFFFF | Yes | 0x0000 | 0x4B37 |
| CRC-16/IBM (ARC) | 0x8005 | 0x0000 | Yes | 0x0000 | 0xBB3D |
This calculator implements CRC-16/CCITT-FALSE, which is the most commonly meant variant when someone says “CRC-16 CCITT”. It is used by Kermit file transfer (minus reflection), certain SD card command sequences, and many industrial serial protocols. If your protocol documentation says “CCITT” without further qualification, start here.
If your protocol requires MODBUS — common in industrial sensor networks and PLCs — you need the reflected polynomial with a different initial value. XMODEM uses the same polynomial as CCITT-FALSE but starts from 0x0000 instead of 0xFFFF, producing a different result. Always use the check value for the string 123456789 to verify you have the right variant.
Practical usage
To checksum text, type or paste directly and the hex result updates live. To checksum raw bytes (for example, verifying a protocol frame), switch to hex-bytes mode and enter space-separated hex pairs: 01 A4 FF 7E. The tool re-encodes to a byte array, not UTF-8, so numeric values outside the ASCII range behave correctly.
CRC-16 detects all single-bit errors and all burst errors shorter than 16 bits — a significant practical advantage over an 8-bit CRC for protocol frames under a few kilobytes. It is not cryptographic and is easy to intentionally forge, so never use it as a security mechanism. Everything is computed in pure JavaScript in your browser; nothing is uploaded.