Standard test vector
CRC implementations are commonly verified with the ASCII input 123456789. For CRC-16/EN-13757, the expected result is 0xC2B7.
- Input format
- ASCII
- Input
- 123456789
- Expected CRC
- 0xC2B7
- Residue
- 0xA366
CRC-16/EN-13757 is used in metering communication standards including M-Bus.
Input data and input type are stored in the URL so this calculation can be reopened or shared.
Modbus, CCITT, XMODEM 등 표준 CRC 계산, 룩업 테이블(CRC Table) 배열 추출, 소스 코드 및 역산 툴
Text는 UTF-8 바이트로 변환됩니다.
Calculated result
Calculated automatically from 9 input bytes.
CRC result
원하는 최종 CRC 값이 나오도록 데이터 뒤에 채워야 할 패치 바이트(2바이트)를 역산합니다.
완벽하게 정렬된 순수 CRC 8/16/32 테이블 배열 텍스트입니다.
0x0000, 0x3D65, 0x7ACA, 0x47AF, 0xF594, 0xC8F1, 0x8F5E, 0xB23B,
0xD64D, 0xEB28, 0xAC87, 0x91E2, 0x23D9, 0x1EBC, 0x5913, 0x6476,
0x91FF, 0xAC9A, 0xEB35, 0xD650, 0x646B, 0x590E, 0x1EA1, 0x23C4,
0x47B2, 0x7AD7, 0x3D78, 0x001D, 0xB226, 0x8F43, 0xC8EC, 0xF589,
0x1E9B, 0x23FE, 0x6451, 0x5934, 0xEB0F, 0xD66A, 0x91C5, 0xACA0,
0xC8D6, 0xF5B3, 0xB21C, 0x8F79, 0x3D42, 0x0027, 0x4788, 0x7AED,
0x8F64, 0xB201, 0xF5AE, 0xC8CB, 0x7AF0, 0x4795, 0x003A, 0x3D5F,
0x5929, 0x644C, 0x23E3, 0x1E86, 0xACBD, 0x91D8, 0xD677, 0xEB12,
0x3D36, 0x0053, 0x47FC, 0x7A99, 0xC8A2, 0xF5C7, 0xB268, 0x8F0D,
0xEB7B, 0xD61E, 0x91B1, 0xACD4, 0x1EEF, 0x238A, 0x6425, 0x5940,
0xACC9, 0x91AC, 0xD603, 0xEB66, 0x595D, 0x6438, 0x2397, 0x1EF2,
0x7A84, 0x47E1, 0x004E, 0x3D2B, 0x8F10, 0xB275, 0xF5DA, 0xC8BF,
0x23AD, 0x1EC8, 0x5967, 0x6402, 0xD639, 0xEB5C, 0xACF3, 0x9196,
0xF5E0, 0xC885, 0x8F2A, 0xB24F, 0x0074, 0x3D11, 0x7ABE, 0x47DB,
0xB252, 0x8F37, 0xC898, 0xF5FD, 0x47C6, 0x7AA3, 0x3D0C, 0x0069,
0x641F, 0x597A, 0x1ED5, 0x23B0, 0x918B, 0xACEE, 0xEB41, 0xD624,
0x7A6C, 0x4709, 0x00A6, 0x3DC3, 0x8FF8, 0xB29D, 0xF532, 0xC857,
0xAC21, 0x9144, 0xD6EB, 0xEB8E, 0x59B5, 0x64D0, 0x237F, 0x1E1A,
0xEB93, 0xD6F6, 0x9159, 0xAC3C, 0x1E07, 0x2362, 0x64CD, 0x59A8,
0x3DDE, 0x00BB, 0x4714, 0x7A71, 0xC84A, 0xF52F, 0xB280, 0x8FE5,
0x64F7, 0x5992, 0x1E3D, 0x2358, 0x9163, 0xAC06, 0xEBA9, 0xD6CC,
0xB2BA, 0x8FDF, 0xC870, 0xF515, 0x472E, 0x7A4B, 0x3DE4, 0x0081,
0xF508, 0xC86D, 0x8FC2, 0xB2A7, 0x009C, 0x3DF9, 0x7A56, 0x4733,
0x2345, 0x1E20, 0x598F, 0x64EA, 0xD6D1, 0xEBB4, 0xAC1B, 0x917E,
0x475A, 0x7A3F, 0x3D90, 0x00F5, 0xB2CE, 0x8FAB, 0xC804, 0xF561,
0x9117, 0xAC72, 0xEBDD, 0xD6B8, 0x6483, 0x59E6, 0x1E49, 0x232C,
0xD6A5, 0xEBC0, 0xAC6F, 0x910A, 0x2331, 0x1E54, 0x59FB, 0x649E,
0x00E8, 0x3D8D, 0x7A22, 0x4747, 0xF57C, 0xC819, 0x8FB6, 0xB2D3,
0x59C1, 0x64A4, 0x230B, 0x1E6E, 0xAC55, 0x9130, 0xD69F, 0xEBFA,
0x8F8C, 0xB2E9, 0xF546, 0xC823, 0x7A18, 0x477D, 0x00D2, 0x3DB7,
0xC83E, 0xF55B, 0xB2F4, 0x8F91, 0x3DAA, 0x00CF, 0x4760, 0x7A05,
0x1E73, 0x2316, 0x64B9, 0x59DC, 0xEBE7, 0xD682, 0x912D, 0xAC48/*
* Model: CRC-16 / EN-13757 (16-bit)
* Poly: 0x3D65, Init: 0x0000, XorOut: 0xFFFF
* CRC Table C Source Code & Lookup Table Generator
*/
#include <stdint.h>
#include <stddef.h>
const uint16_t crc_table[256] = {
0x0000, 0x3D65, 0x7ACA, 0x47AF, 0xF594, 0xC8F1, 0x8F5E, 0xB23B,
0xD64D, 0xEB28, 0xAC87, 0x91E2, 0x23D9, 0x1EBC, 0x5913, 0x6476,
0x91FF, 0xAC9A, 0xEB35, 0xD650, 0x646B, 0x590E, 0x1EA1, 0x23C4,
0x47B2, 0x7AD7, 0x3D78, 0x001D, 0xB226, 0x8F43, 0xC8EC, 0xF589,
0x1E9B, 0x23FE, 0x6451, 0x5934, 0xEB0F, 0xD66A, 0x91C5, 0xACA0,
0xC8D6, 0xF5B3, 0xB21C, 0x8F79, 0x3D42, 0x0027, 0x4788, 0x7AED,
0x8F64, 0xB201, 0xF5AE, 0xC8CB, 0x7AF0, 0x4795, 0x003A, 0x3D5F,
0x5929, 0x644C, 0x23E3, 0x1E86, 0xACBD, 0x91D8, 0xD677, 0xEB12,
0x3D36, 0x0053, 0x47FC, 0x7A99, 0xC8A2, 0xF5C7, 0xB268, 0x8F0D,
0xEB7B, 0xD61E, 0x91B1, 0xACD4, 0x1EEF, 0x238A, 0x6425, 0x5940,
0xACC9, 0x91AC, 0xD603, 0xEB66, 0x595D, 0x6438, 0x2397, 0x1EF2,
0x7A84, 0x47E1, 0x004E, 0x3D2B, 0x8F10, 0xB275, 0xF5DA, 0xC8BF,
0x23AD, 0x1EC8, 0x5967, 0x6402, 0xD639, 0xEB5C, 0xACF3, 0x9196,
0xF5E0, 0xC885, 0x8F2A, 0xB24F, 0x0074, 0x3D11, 0x7ABE, 0x47DB,
0xB252, 0x8F37, 0xC898, 0xF5FD, 0x47C6, 0x7AA3, 0x3D0C, 0x0069,
0x641F, 0x597A, 0x1ED5, 0x23B0, 0x918B, 0xACEE, 0xEB41, 0xD624,
0x7A6C, 0x4709, 0x00A6, 0x3DC3, 0x8FF8, 0xB29D, 0xF532, 0xC857,
0xAC21, 0x9144, 0xD6EB, 0xEB8E, 0x59B5, 0x64D0, 0x237F, 0x1E1A,
0xEB93, 0xD6F6, 0x9159, 0xAC3C, 0x1E07, 0x2362, 0x64CD, 0x59A8,
0x3DDE, 0x00BB, 0x4714, 0x7A71, 0xC84A, 0xF52F, 0xB280, 0x8FE5,
0x64F7, 0x5992, 0x1E3D, 0x2358, 0x9163, 0xAC06, 0xEBA9, 0xD6CC,
0xB2BA, 0x8FDF, 0xC870, 0xF515, 0x472E, 0x7A4B, 0x3DE4, 0x0081,
0xF508, 0xC86D, 0x8FC2, 0xB2A7, 0x009C, 0x3DF9, 0x7A56, 0x4733,
0x2345, 0x1E20, 0x598F, 0x64EA, 0xD6D1, 0xEBB4, 0xAC1B, 0x917E,
0x475A, 0x7A3F, 0x3D90, 0x00F5, 0xB2CE, 0x8FAB, 0xC804, 0xF561,
0x9117, 0xAC72, 0xEBDD, 0xD6B8, 0x6483, 0x59E6, 0x1E49, 0x232C,
0xD6A5, 0xEBC0, 0xAC6F, 0x910A, 0x2331, 0x1E54, 0x59FB, 0x649E,
0x00E8, 0x3D8D, 0x7A22, 0x4747, 0xF57C, 0xC819, 0x8FB6, 0xB2D3,
0x59C1, 0x64A4, 0x230B, 0x1E6E, 0xAC55, 0x9130, 0xD69F, 0xEBFA,
0x8F8C, 0xB2E9, 0xF546, 0xC823, 0x7A18, 0x477D, 0x00D2, 0x3DB7,
0xC83E, 0xF55B, 0xB2F4, 0x8F91, 0x3DAA, 0x00CF, 0x4760, 0x7A05,
0x1E73, 0x2316, 0x64B9, 0x59DC, 0xEBE7, 0xD682, 0x912D, 0xAC48
};
uint16_t calculate_crc(const uint8_t *data, size_t length) {
uint16_t crc = 0x0000;
for (size_t i = 0; i < length; i++) {
#if 0
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 ^ 0xFFFF;
}CRC implementations are commonly verified with the ASCII input 123456789. For CRC-16/EN-13757, the expected result is 0xC2B7.
A CRC name identifies the complete parameter set, not only its polynomial. Implementations must match width, Init, RefIn, RefOut, and XorOut to reproduce the published check value.
Parameter reference
| Parameter | Value | Meaning | Learn |
|---|---|---|---|
| Width | 16 bits | CRC register and result width | Read guide → |
| Poly | 0x3D65 | Generator polynomial without the leading term | Read guide → |
| Init | 0x0000 | Initial CRC register value | Read guide → |
| RefIn | false | Reflect each input byte before processing | Read guide → |
| RefOut | false | Reflect the register before XOR Out | Read guide → |
| XorOut | 0xFFFF | Final value XORed with the CRC register | Read guide → |
| Check | 0xC2B7 | CRC of ASCII “123456789” | Read guide → |
| Residue | 0xA366 | Expected residue after appending a valid CRC | Read guide → |
For the standard ASCII test input 123456789, the check value is 0xC2B7.
It uses the 16-bit polynomial 0x3D65.
RefIn=false and RefOut=false.
This free online CRC calculator computes CRC-8, CRC-16, and CRC-32 checksums from UTF-8 text, hexadecimal, decimal-byte, binary-bit, Base64 input, or binary files. You can select common preset algorithms such as CRC-16/MODBUS, CRC-16/CCITT-FALSE, CRC-16/XMODEM, CRC-16/KERMIT, and CRC-32/ISO-HDLC, or define custom CRC parameters for your own protocol.
The calculator also generates CRC lookup tables and complete source code for C, Python, and JavaScript. All calculations are performed locally in your browser, so uploaded files and input data are not sent to a server.
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.
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.
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.
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.
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.
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.
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.
No. CRC calculations and file processing are performed locally in the browser. Your files and input data are not uploaded to the website server.
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, while CRC-16/MODBUS produces 0x4B37.