CRC Calculator

CRC16 Calculator

Calculate a 16-bit CRC for text, hex bytes or a file. The table below the calculator shows all 31 CRC-16 variants for your input at once, so you can find the one that matches your protocol or device.

9 bytes
Parameters

ResultCRC-16/CCITT-FALSE

0x29B1
Decimal
10673
Binary
0010100110110001
Bytes, big-endian
29 B1
Bytes, little-endian
B1 29

Check value for "123456789": 0x29B1

Source code for this CRC

Generated for the parameters above. Bit-by-bit and table-free, so it is easy to port to a microcontroller.

#include <stddef.h>
#include <stdint.h>

uint16_t crc_16_ccitt_false(const uint8_t *data, size_t len)
{
    uint16_t crc = 0xFFFF;
    while (len--) {
        crc ^= (uint16_t)*data++ << 8;
        for (int i = 0; i < 8; i++)
            crc = (crc & 0x8000) ? (crc << 1) ^ 0x1021 : crc << 1;
    }
    return crc;
}

All CRC algorithms for this input

Click a row to load its parameters into the calculator.

AlgorithmResultPolyInitRefInRefOutXorOutCheckUsed in
0xBB3D0x80050x0000truetrue0x00000xBB3DARC, LHA, legacy disk formats
0x4B370x80050xFFFFtruetrue0x00000x4B37Modbus RTU frames
0xB4C80x80050xFFFFtruetrue0xFFFF0xB4C8USB data packets
0x44C20x80050x0000truetrue0xFFFF0x44C2Maxim 1-Wire / iButton
0x29B10x10210xFFFFfalsefalse0x00000x29B1Most "CCITT" implementations, AUTOSAR
0x31C30x10210x0000falsefalse0x00000x31C3XMODEM, ZMODEM, SD card data
0x21890x10210x0000truetrue0x00000x2189Kermit, Bluetooth, V.41
0x906E0x10210xFFFFtruetrue0xFFFF0x906EX.25, HDLC, PPP, ISO 14443-B
0x6F910x10210xFFFFtruetrue0x00000x6F91Microchip MCRF4xx, MAVLink
0xD64E0x10210xFFFFfalsefalse0xFFFF0xD64EGrundfos GENIbus, EPC RFID
0xE5CC0x10210x1D0Ffalsefalse0x00000xE5CCFujitsu SPI flash
0xCE3C0x10210x0000falsefalse0xFFFF0xCE3CGSM
0x26B10x10210x89ECtruetrue0x00000x26B1TI TMS37157 transponders
0x63D00x10210xB2AAtruetrue0x00000x63D0Riello UPS protocol
0xBF050x10210xC6C6truetrue0x00000xBF05ISO 14443-A (MIFARE, NFC-A)
0xEA820x3D650x0000truetrue0xFFFF0xEA82DNP3 (SCADA)
0xC2B70x3D650x0000falsefalse0xFFFF0xC2B7Wireless M-Bus metering
0xFEE80x80050x0000falsefalse0x00000xFEE8Verifone, UMTS
0xAEE70x80050xFFFFfalsefalse0x00000xAEE7RPM package format
0x9ECF0x80050x800Dfalsefalse0x00000x9ECFELV DDS-110 function generator
0x007E0x05890x0000falsefalse0x00010x007EDECT cordless
0x007F0x05890x0000falsefalse0x00000x007FDECT cordless
0xD0DB0x8BB70x0000falsefalse0x00000xD0DBSCSI data integrity field
0x0FB30xA0970x0000falsefalse0x00000x0FB3Teledisk disk images
0x4C060xC8670xFFFFfalsefalse0x00000x4C06CDMA2000 mobile
0xA8190x1DCF0xFFFFfalsefalse0xFFFF0xA819PROFIBUS PA
0x5D380x59350x0000falsefalse0x00000x5D38openSAFETY
0x20FE0x755B0x0000falsefalse0x00000x20FEopenSAFETY
0xBDF40x6F630x0000falsefalse0x00000xBDF4LoJack vehicle tracking
0xA0660x080B0xFFFFtruetrue0x00000xA066HD Radio
0x772B0x59350xFFFFfalsefalse0x00000x772BM17 digital radio

The CRC16 variants you are most likely to meet

"CRC16" names a family, not one algorithm. Most variants are built on one of two polynomials — 0x1021 (CCITT) or 0x8005 (IBM / ANSI) — and differ only in the initial value, bit reflection and final XOR.

VariantPolyInitReflectedXorOutCheck
CRC-16/CCITT-FALSE1021FFFFno000029B1
CRC-16/XMODEM10210000no000031C3
CRC-16/KERMIT (CCITT)10210000yes00002189
CRC-16/X-251021FFFFyesFFFF906E
CRC-16/ARC (IBM)80050000yes0000BB3D
CRC-16/MODBUS8005FFFFyes00004B37
CRC-16/USB8005FFFFyesFFFFB4C8

The check value is the CRC of the nine ASCII characters 123456789. It is the quickest way to confirm that a piece of code implements the variant its name claims.

How to identify an unknown CRC16

  1. Capture one complete message together with its two CRC bytes.
  2. Paste the message without the CRC bytes into the calculator in Hex mode.
  3. Scan the result column of the table for the captured CRC. Check both byte orders — 4B 37 on the wire may be the value 0x374B or 0x4B37.
  4. If nothing matches, the CRC may cover a different range than you assumed. Try with and without the header, address or length bytes.

Where each variant is used

  • CRC-16/MODBUS — Modbus RTU on RS-485 and RS-232. There is a dedicated Modbus CRC calculator that builds and verifies whole frames.
  • CRC-16/CCITT-FALSE — the variant most libraries and datasheets mean by "CRC-CCITT"; also the AUTOSAR 16-bit CRC.
  • CRC-16/XMODEM — XMODEM and ZMODEM file transfer, SD card data blocks, many bootloaders.
  • CRC-16/KERMIT — Kermit, Bluetooth, and other protocols following ITU-T V.41 exactly.
  • CRC-16/X-25 — HDLC, PPP, X.25 and ISO 14443 type B contactless cards.
  • CRC-16/ARC — the original IBM CRC-16: ARC and LHA archives and many older file formats.
  • CRC-16/DNP and CRC-16/EN-13757 — DNP3 in utilities and wireless M-Bus in metering.

Need a wider checksum? The CRC32 calculator covers CRC-32, CRC-32C and CRC-64 with the same interface.

Frequently asked questions

Which CRC16 is the "standard" one?

There is no single standard. "CRC-16" on its own usually means CRC-16/ARC (polynomial 0x8005, reflected, initial value 0), while "CRC-16 CCITT" usually means CRC-16/CCITT-FALSE (polynomial 0x1021, initial value 0xFFFF, not reflected). Always confirm with a known test vector: for "123456789", ARC gives 0xBB3D and CCITT-FALSE gives 0x29B1.

What is the difference between CRC-16/CCITT-FALSE, XMODEM and KERMIT?

All three use polynomial 0x1021. CCITT-FALSE starts from 0xFFFF and is not reflected (check value 0x29B1). XMODEM starts from 0x0000 and is not reflected (0x31C3). KERMIT starts from 0x0000 and is reflected (0x2189) — this is the "true" CCITT CRC defined in ITU-T V.41.

What does the polynomial 0xA001 mean?

0xA001 is 0x8005 with its 16 bits reversed. Reflected CRC-16 implementations such as MODBUS and ARC shift right and therefore store the polynomial bit-reversed. Likewise 0x8408 is the reflected form of 0x1021.

In which byte order is a CRC16 transmitted?

It depends on the protocol. Modbus RTU sends the low byte first. XMODEM and most CCITT-based protocols send the high byte first. The result panel shows both byte orders so you can copy the one your protocol needs.

How many errors can a CRC16 detect?

A 16-bit CRC detects every single-bit error, every burst error up to 16 bits long, and about 99.998% of longer random corruptions (all but 1 in 65,536). For messages longer than a few kilobytes, a 32-bit CRC is the safer choice.