CRC-16 Hash Generator
Generate CRC-16 hash checksums from text or files. Supports 10+ variants: MODBUS, CCITT, XMODEM, ARC, USB, DNP, Kermit and more.
About
CRC-16 (Cyclic Redundancy Check, 16-bit) is a family of error-detecting codes used in digital networks, storage devices, and industrial protocols (MODBUS, DNP3, USB). The generator polynomial G(x) of degree 16 divides the input message polynomial over GF(2), producing a 16-bit remainder. Incorrect polynomial selection or init-value mismatch silently passes corrupted frames in SCADA and PLC communications. This tool computes CRC-16 using precomputed 256-entry lookup tables for each variant, matching bit-reflection and XOR-out parameters defined by the catalogue maintained by Greg Cook. It approximates no values; every variant reproduces reference test vectors for the ASCII string "123456789".
Note: CRC-16 detects all single-bit, double-bit, and odd-count bit errors within its Hamming distance, but it is not a cryptographic hash. Do not use it for authentication or tamper detection. For files, processing is offloaded to a background thread to avoid UI blocking.
Formulas
CRC-16 treats the input byte sequence as a polynomial M(x) over GF(2) and computes the remainder after division by a generator polynomial G(x) of degree 16.
For table-driven computation, a 256-entry lookup table T is precomputed. For each byte b in the message, the register R is updated:
When RefIn is TRUE, each input byte is bit-reversed before processing. When RefOut is TRUE, the final register is bit-reversed before XOR. The reflected variant uses a mirrored polynomial and processes from the low byte:
Where M(x) = message polynomial, G(x) = generator polynomial, R = CRC register (initialized to Init), T = lookup table, b = current byte, โ = bitwise XOR, XorOut = final XOR mask.
Reference Data
| Variant | Polynomial | Init | RefIn | RefOut | XorOut | Check ("123456789") | Common Use |
|---|---|---|---|---|---|---|---|
| CRC-16/ARC | 0x8005 | 0x0000 | true | true | 0x0000 | 0xBB3D | ARC, LHA |
| CRC-16/CCITT-FALSE | 0x1021 | 0xFFFF | false | false | 0x0000 | 0x29B1 | Bluetooth, PPP |
| CRC-16/XMODEM | 0x1021 | 0x0000 | false | false | 0x0000 | 0x31C3 | XMODEM, ZMODEM |
| CRC-16/MODBUS | 0x8005 | 0xFFFF | true | true | 0x0000 | 0x4B37 | MODBUS RTU |
| CRC-16/USB | 0x8005 | 0xFFFF | true | true | 0xFFFF | 0xB4C8 | USB Token/Data |
| CRC-16/BUYPASS | 0x8005 | 0x0000 | false | false | 0x0000 | 0xFEE8 | Verifone, Buypass |
| CRC-16/CDMA2000 | 0xC867 | 0xFFFF | false | false | 0x0000 | 0x4C06 | CDMA2000 3GPP2 |
| CRC-16/DNP | 0x3D65 | 0x0000 | true | true | 0xFFFF | 0xEA82 | DNP3 SCADA |
| CRC-16/MAXIM | 0x8005 | 0x0000 | true | true | 0xFFFF | 0x44C2 | 1-Wire Maxim |
| CRC-16/KERMIT | 0x1021 | 0x0000 | true | true | 0x0000 | 0x2189 | Kermit Protocol |
| CRC-16/AUG-CCITT | 0x1021 | 0x1D0F | false | false | 0x0000 | 0xE5CC | SPI, IยฒC |
| CRC-16/GENIBUS | 0x1021 | 0xFFFF | false | false | 0xFFFF | 0xD64E | EPC Gen 2 RFID |