CRC Lookup Table Generator – CRC32, CRC16, CRC8 Table Viewer & Export

Browse CRC parameters and generate 256-entry lookup tables for 100+ CRC algorithms

What is a CRC Lookup Table?

A CRC lookup table is a precomputed array of 256 values that accelerates byte-wise CRC calculation. Instead of processing each bit individually, a byte-at-a-time implementation XORs the input byte with the current CRC, uses the result as an index into the 256-entry table, and combines the table value with the shifted accumulator — reducing an 8-step inner loop to a single table lookup.

This generator computes the authoritative 256-entry table for any supported CRC algorithm. Every entry is derived directly from the algorithm's polynomial and reflection settings, so the table matches what embedded and systems code actually uses at runtime.

How to Use This Tool

Settings Panel

The settings panel on the left controls what the tool generates:

  • CRC Algorithm — Select any of the 100+ CRC algorithms from the dropdown, ranging from CRC-3 through CRC-64. The list follows the Catalogue of CRC Algorithms naming convention. Popular choices include CRC-32/ISO-HDLC (Ethernet, ZIP), CRC-16/MODBUS (industrial serial), CRC-8/MAXIM-DOW (1-Wire sensors), and CRC-64/WE (storage). Changing the algorithm instantly regenerates the full table.
  • Output Format — Switch between Table and Script views. Table mode shows all 256 entries in a grid for visual inspection. Script mode generates a ready-to-paste array declaration for your target language.
  • Table Format (Table mode only) — Choose how numeric values are displayed: Hex (e.g. 0x77073096), Decimal (e.g. 1996959894), or Binary (e.g. 0b01110111...). Hex is the most common format for embedded development.
  • Language (Script mode only) — Select the target programming language for the exported array declaration: C, C++, Go, Java, JavaScript, Kotlin, Python, Rust, Swift, or TypeScript. Each export includes a comment header with the algorithm name and all parameters (poly, init, refin, refout, xorout).

Result Panel

The result panel shows three sections:

  • Summary — Displays the algorithm's key parameters at a glance: Width (bit size), Poly (generator polynomial), Init (initial CRC value), XOR-out (final XOR mask), Check (CRC of "123456789"), Residue (expected CRC remainder for valid frames), RefIn (whether input bytes are bit-reflected), RefOut (whether the final CRC is bit-reflected). Use the Copy button to copy all parameters as a single line of text.
  • Entry Inspector — Type any index from 0 to 255 (decimal or hex with 0x prefix) to instantly look up that table entry. For example, entering 0x01 for CRC-32/ISO-HDLC shows table[0x01] = 0x77073096. The corresponding row in the table is also highlighted in the grid view.
  • Lookup Table / Export Script — In Table mode, all 256 entries are shown in an 8-column grid with row offsets as hexadecimal labels. In Script mode, the full array declaration is displayed ready to copy. Use the Copy button to copy the entire output to your clipboard.

Typical Workflow

  1. Select your CRC algorithm from the dropdown (e.g. CRC-32/ISO-HDLC for Ethernet or ZIP)
  2. Check the Summary panel to confirm the parameters match your specification
  3. Switch Output Format to Script and select your language
  4. Click Copy to copy the array declaration and paste it into your project
  5. Verify your implementation using the CRC Calculator: compute CRC of "123456789" and compare to the Check value in the Summary

How Byte-Wise CRC Works

The standard table-driven CRC loop (reflected variant) looks like this:

crc = init
for byte in data:
    crc = table[(crc ^ byte) & 0xFF] ^ (crc >> 8)
crc ^= xorout

For non-reflected (normal) algorithms, the byte is shifted into the high end of the accumulator instead:

crc = init
for byte in data:
    crc = table[((crc >> (width-8)) ^ byte) & 0xFF] ^ (crc << 8)
crc ^= xorout

The exported Script output includes the exact array declaration for your target language, with polynomial and parameter annotations — ready to paste directly into your project.

Table Generation Method

Each of the 256 table entries is computed by treating the index as an 8-bit input byte, running it through the standard CRC bit-by-bit loop, and recording the result. For reflected algorithms the polynomial is bit-reversed before processing; for normal algorithms the input byte is positioned in the high bits of the accumulator. The output is masked to the algorithm's actual bit width.

Check Value Verification

The Summary panel shows the algorithm's check value — the CRC of the ASCII string "123456789". Use the CRC Calculator to verify your table-driven implementation produces the same result.

Storage Type Selection

  • CRC-3 through CRC-8: stored in u8 / uint8_t
  • CRC-9 through CRC-16: stored in u16 / uint16_t
  • CRC-17 through CRC-32: stored in u32 / uint32_t
  • CRC-40 through CRC-64: stored in u64 / uint64_t

Commonly Used CRC Lookup Tables

CRC-32/ISO-HDLC (Ethernet, ZIP, gzip, PNG)

  • Polynomial: 0x04C11DB7 (reflected: 0xEDB88320)
  • Init: 0xFFFFFFFF | XOR-out: 0xFFFFFFFF | RefIn/RefOut: true
  • Check value ("123456789"): 0xCBF43926
  • The first entry in the reflected table is always 0x00000000; entry [1] is 0x77073096

CRC-16/MODBUS

  • Polynomial: 0x8005 (reflected: 0xA001)
  • Init: 0xFFFF | XOR-out: 0x0000 | RefIn/RefOut: true
  • Check value: 0x4B37
  • Widely used in Modbus RTU framing for industrial serial communication

CRC-8/MAXIM-DOW (1-Wire)

  • Polynomial: 0x31 (reflected: 0x8C)
  • Init: 0x00 | XOR-out: 0x00 | RefIn/RefOut: true
  • Check value: 0xA1
  • Used in Dallas/Maxim 1-Wire sensors (DS18B20 temperature, DS2401 serial number)

Frequently Asked Questions

What is a CRC lookup table and why is it used?

A CRC lookup table is a precomputed array of 256 values that accelerates byte-wise CRC calculation. Instead of processing all 8 bits of each input byte individually, an implementation XORs the current byte with the CRC accumulator, uses the result as an index into the table, and combines the table value with the shifted accumulator in a single step — reducing the inner loop from 8 iterations to one table lookup.

How is the CRC-32/ISO-HDLC (Ethernet, ZIP, gzip) lookup table generated?

The table uses the reflected polynomial 0xEDB88320 (bit-reversal of 0x04C11DB7'). Each of the 256 entries is computed by treating the index as an 8-bit input, running the standard 8-step bit-wise CRC loop with the reflected polynomial. Entry [1] is 0x77073096; entry [255] is 0x2D02EF8D.

What is the byte-wise CRC loop for a reflected (RefIn=true) algorithm?

For CRC-32/ISO-HDLC, CRC-16/MODBUS, CRC-8/MAXIM-DOW and all other reflected algorithms:

crc = init
for byte in data:
    crc = table[(crc ^ byte) & 0xFF] ^ (crc >> 8)
crc ^= xorout

How does a non-reflected (RefIn=false) CRC table loop differ?

For CRC-32/MPEG-2, CRC-16/IBM-3740, CRC-8/SMBUS and other non-reflected algorithms:

crc = init
for byte in data:
    crc = table[((crc >> (width-8)) ^ byte) & 0xFF] ^ (crc << 8)
crc &= mask
crc ^= xorout

What storage type is used for each CRC width?

  • CRC-1 to CRC-8 → u8 / uint8_t
  • CRC-9 to CRC-16 → u16 / uint16_t
  • CRC-17 to CRC-32 → u32 / uint32_t
  • CRC-33 to CRC-64 → u64 / uint64_t

How can I verify that my CRC lookup table implementation is correct?

Every CRC algorithm has a published check value — the CRC of the ASCII string "123456789". Run your table-driven implementation on that string and compare the result to the check value shown in the Summary panel. For CRC-32/ISO-HDLC the check value is 0xCBF43926; for CRC-16/MODBUS it is 0x4B37; for CRC-8/MAXIM-DOW it is 0xA1.

What is the CRC-16/MODBUS lookup table first entry?

The CRC-16/MODBUS table uses the reflected polynomial 0xA001 (bit-reversal of 0x8005). Table entry [0] is 0x0000 and entry [1] is 0xC0C1. Init is 0xFFFF.

Which output languages are supported for CRC table export?

The Script export supports: C, C++ (std::array), Go, Java (long[]), JavaScript, Kotlin (longArrayOf), Python, Rust (const [T; 256]), Swift, and TypeScript. Each export includes a comment header with algorithm name and full parameter set.

Is data sent to a server when generating CRC lookup tables?

No. All table generation runs entirely in WebAssembly compiled from Rust, executing locally in your browser. No input, algorithm selection, or table output is transmitted to any server. Settings are saved only to your browser's localStorage.

Related Tools

  • TOTP Generator - Generate RFC 6238 TOTP codes from a Base32 secret: SHA-1/SHA-256/SHA-512, 15/30/60s steps, 6 or 8 digits. otpauth:// QR for authenticator apps, verify with time drift tolerance, optional HMAC debug. Client-side only.
  • JWT Encoder & Decoder - Decode JWT header and payload, verify HS256/HS384/HS512 signatures with your secret, inspect exp/iat/nbf/iss/sub/aud, and encode new JWTs from JSON—all in the browser. No upload; ideal for API auth debugging and learning RFC 7519.
  • TLS Certificate Analyzer - Decode PEM or DER X.509 certificates in the browser: subject/issuer, validity, SAN, key usage, fingerprints, and chain relationships—useful for HTTPS debugging and DevOps. No upload to a backend.
  • CRC Calculator - Calculate CRC checksums with 100+ algorithms for data integrity verification
  • File Hash Calculator - Compute cryptographic hashes for files and text in your browser: MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3, Blake2, and more. Drag-and-drop files, hex/base64 output, side-by-side comparison. Nothing uploaded—runs locally with Web Crypto.

Lookup Table Settings

CRC-32/ISO-HDLC Result
Summary
Width
CRC-32
Poly
0x04C11DB7
Init
0xFFFFFFFF
XOR-out
0xFFFFFFFF
Check
0xCBF43926
Residue
0xDEBB20E3
RefIn
true
RefOut
true
Entry Inspector
table[0x00]
0x00000000
Lookup Table (Hex, 8 columns)
+0+1+2+3+4+5+6+7
00: 0x0000000001: 0x7707309602: 0xEE0E612C03: 0x990951BA04: 0x076DC41905: 0x706AF48F06: 0xE963A53507: 0x9E6495A3
08: 0x0EDB883209: 0x79DCB8A40A: 0xE0D5E91E0B: 0x97D2D9880C: 0x09B64C2B0D: 0x7EB17CBD0E: 0xE7B82D070F: 0x90BF1D91
10: 0x1DB7106411: 0x6AB020F212: 0xF3B9714813: 0x84BE41DE14: 0x1ADAD47D15: 0x6DDDE4EB16: 0xF4D4B55117: 0x83D385C7
18: 0x136C985619: 0x646BA8C01A: 0xFD62F97A1B: 0x8A65C9EC1C: 0x14015C4F1D: 0x63066CD91E: 0xFA0F3D631F: 0x8D080DF5
20: 0x3B6E20C821: 0x4C69105E22: 0xD56041E423: 0xA267717224: 0x3C03E4D125: 0x4B04D44726: 0xD20D85FD27: 0xA50AB56B
28: 0x35B5A8FA29: 0x42B2986C2A: 0xDBBBC9D62B: 0xACBCF9402C: 0x32D86CE32D: 0x45DF5C752E: 0xDCD60DCF2F: 0xABD13D59
30: 0x26D930AC31: 0x51DE003A32: 0xC8D7518033: 0xBFD0611634: 0x21B4F4B535: 0x56B3C42336: 0xCFBA959937: 0xB8BDA50F
38: 0x2802B89E39: 0x5F0588083A: 0xC60CD9B23B: 0xB10BE9243C: 0x2F6F7C873D: 0x58684C113E: 0xC1611DAB3F: 0xB6662D3D
40: 0x76DC419041: 0x01DB710642: 0x98D220BC43: 0xEFD5102A44: 0x71B1858945: 0x06B6B51F46: 0x9FBFE4A547: 0xE8B8D433
48: 0x7807C9A249: 0x0F00F9344A: 0x9609A88E4B: 0xE10E98184C: 0x7F6A0DBB4D: 0x086D3D2D4E: 0x91646C974F: 0xE6635C01
50: 0x6B6B51F451: 0x1C6C616252: 0x856530D853: 0xF262004E54: 0x6C0695ED55: 0x1B01A57B56: 0x8208F4C157: 0xF50FC457
58: 0x65B0D9C659: 0x12B7E9505A: 0x8BBEB8EA5B: 0xFCB9887C5C: 0x62DD1DDF5D: 0x15DA2D495E: 0x8CD37CF35F: 0xFBD44C65
60: 0x4DB2615861: 0x3AB551CE62: 0xA3BC007463: 0xD4BB30E264: 0x4ADFA54165: 0x3DD895D766: 0xA4D1C46D67: 0xD3D6F4FB
68: 0x4369E96A69: 0x346ED9FC6A: 0xAD6788466B: 0xDA60B8D06C: 0x44042D736D: 0x33031DE56E: 0xAA0A4C5F6F: 0xDD0D7CC9
70: 0x5005713C71: 0x270241AA72: 0xBE0B101073: 0xC90C208674: 0x5768B52575: 0x206F85B376: 0xB966D40977: 0xCE61E49F
78: 0x5EDEF90E79: 0x29D9C9987A: 0xB0D098227B: 0xC7D7A8B47C: 0x59B33D177D: 0x2EB40D817E: 0xB7BD5C3B7F: 0xC0BA6CAD
80: 0xEDB8832081: 0x9ABFB3B682: 0x03B6E20C83: 0x74B1D29A84: 0xEAD5473985: 0x9DD277AF86: 0x04DB261587: 0x73DC1683
88: 0xE3630B1289: 0x94643B848A: 0x0D6D6A3E8B: 0x7A6A5AA88C: 0xE40ECF0B8D: 0x9309FF9D8E: 0x0A00AE278F: 0x7D079EB1
90: 0xF00F934491: 0x8708A3D292: 0x1E01F26893: 0x6906C2FE94: 0xF762575D95: 0x806567CB96: 0x196C367197: 0x6E6B06E7
98: 0xFED41B7699: 0x89D32BE09A: 0x10DA7A5A9B: 0x67DD4ACC9C: 0xF9B9DF6F9D: 0x8EBEEFF99E: 0x17B7BE439F: 0x60B08ED5
A0: 0xD6D6A3E8A1: 0xA1D1937EA2: 0x38D8C2C4A3: 0x4FDFF252A4: 0xD1BB67F1A5: 0xA6BC5767A6: 0x3FB506DDA7: 0x48B2364B
A8: 0xD80D2BDAA9: 0xAF0A1B4CAA: 0x36034AF6AB: 0x41047A60AC: 0xDF60EFC3AD: 0xA867DF55AE: 0x316E8EEFAF: 0x4669BE79
B0: 0xCB61B38CB1: 0xBC66831AB2: 0x256FD2A0B3: 0x5268E236B4: 0xCC0C7795B5: 0xBB0B4703B6: 0x220216B9B7: 0x5505262F
B8: 0xC5BA3BBEB9: 0xB2BD0B28BA: 0x2BB45A92BB: 0x5CB36A04BC: 0xC2D7FFA7BD: 0xB5D0CF31BE: 0x2CD99E8BBF: 0x5BDEAE1D
C0: 0x9B64C2B0C1: 0xEC63F226C2: 0x756AA39CC3: 0x026D930AC4: 0x9C0906A9C5: 0xEB0E363FC6: 0x72076785C7: 0x05005713
C8: 0x95BF4A82C9: 0xE2B87A14CA: 0x7BB12BAECB: 0x0CB61B38CC: 0x92D28E9BCD: 0xE5D5BE0DCE: 0x7CDCEFB7CF: 0x0BDBDF21
D0: 0x86D3D2D4D1: 0xF1D4E242D2: 0x68DDB3F8D3: 0x1FDA836ED4: 0x81BE16CDD5: 0xF6B9265BD6: 0x6FB077E1D7: 0x18B74777
D8: 0x88085AE6D9: 0xFF0F6A70DA: 0x66063BCADB: 0x11010B5CDC: 0x8F659EFFDD: 0xF862AE69DE: 0x616BFFD3DF: 0x166CCF45
E0: 0xA00AE278E1: 0xD70DD2EEE2: 0x4E048354E3: 0x3903B3C2E4: 0xA7672661E5: 0xD06016F7E6: 0x4969474DE7: 0x3E6E77DB
E8: 0xAED16A4AE9: 0xD9D65ADCEA: 0x40DF0B66EB: 0x37D83BF0EC: 0xA9BCAE53ED: 0xDEBB9EC5EE: 0x47B2CF7FEF: 0x30B5FFE9
F0: 0xBDBDF21CF1: 0xCABAC28AF2: 0x53B39330F3: 0x24B4A3A6F4: 0xBAD03605F5: 0xCDD70693F6: 0x54DE5729F7: 0x23D967BF
F8: 0xB3667A2EF9: 0xC4614AB8FA: 0x5D681B02FB: 0x2A6F2B94FC: 0xB40BBE37FD: 0xC30C8EA1FE: 0x5A05DF1BFF: 0x2D02EF8D
Need to compute an actual CRC checksum? Use the CRC Calculator to verify that your table-driven implementation produces the correct check value for any input.