Introduction
Working with XZ archives or debugging a database engine that uses CRC64 for change detection? CRC64 is a 64-bit cyclic redundancy check that produces a wider fingerprint than the common CRC32, reducing collision probability for large data sets. This CRC64 calculator computes the ECMA-182 reflected variant in your browser. Paste any text and get the 16-character hex checksum instantly. No data leaves your device.
What this tool does
- Computes CRC64 using the ECMA-182 reflected polynomial (0xC96C5795D7870F42), the same variant used by XZ Utils.
- Outputs a 16-character hexadecimal string representing the 64-bit checksum.
- Processes input as UTF-8 bytes, matching standard library implementations.
- Uses a precomputed 256-entry lookup table for fast table-driven computation.
- Runs entirely client-side with no network requests.
How this tool works
Type or paste text into the input field. The tool encodes the text as UTF-8 bytes, then runs a table-driven CRC64 computation using two 32-bit registers (since JavaScript lacks native 64-bit integers on ES2017 targets). The 256-entry lookup table is built once on first use and cached for subsequent calls. The result is a 16-character lowercase hexadecimal string displayed in the output field. You can copy it with one click.
How CRC64 works
CRC64 belongs to the family of cyclic redundancy checks, which treat input data as a polynomial over GF(2) and compute the remainder after division by a fixed generator polynomial. The ECMA-182 standard defines the polynomial x^64 + x^62 + x^57 + x^55 + x^54 + x^53 + x^52 + x^47 + x^46 + x^45 + x^40 + x^39 + x^38 + x^37 + x^35 + x^33 + x^32 + x^31 + x^29 + x^27 + x^24 + x^23 + x^22 + x^21 + x^19 + x^17 + x^13 + x^12 + x^10 + x^9 + x^7 + x^4 + x + 1, which corresponds to the hex value 0x42F0E1EBA9EA3693. The reflected variant (used by XZ Utils and most modern implementations) reverses the bit order, giving the reflected polynomial 0xC96C5795D7870F42.
The algorithm initializes the CRC register to all 1s (0xFFFFFFFFFFFFFFFF), processes each byte by XORing it into the low byte of the register, then shifts the register right by 8 bits and XORs with a table entry indexed by the byte. After all bytes are processed, the register is XORed with all 1s again (final reflection). This gives CRC64 a Hamming distance of up to 4 for messages shorter than 2^64 - 1 bits, meaning it detects any 1-, 2-, or 3-bit error and most burst errors within that range.
CRC64 is used by the XZ compression format (defined in the .xz file format specification) for integrity verification. Some database engines, including older versions of IBM DB2, use CRC64 for change data capture and log record checksums.
How to use this tool
- Type or paste the text you want to checksum into the input field.
- The CRC64 value appears instantly in the output field as a 16-character hex string.
- Click the Copy button to copy the checksum to your clipboard.
- Compare the result against a known CRC64 value to verify data integrity.
Real-world examples
Verifying XZ archive integrity
An XZ archive includes a CRC64 checksum in its stream footer. After decompressing a file, you can compute the CRC64 of the decompressed data and compare it against the value stored in the archive. Input: the decompressed file contents. Output: a 16-character hex string that should match the archive's stored checksum.
Database log record checksumming
A database engineer debugging replication issues needs to verify that log records are not corrupted in transit. She computes CRC64 over each log record payload and compares the result against the checksum stored in the log header. Mismatches indicate corruption before the record reaches the replica.
Testing collision resistance vs CRC32
A developer comparing CRC32 and CRC64 for a file deduplication system hashes 10,000 files with both algorithms. CRC32 produces 8-character hex values with a 32-bit collision space (about 4 billion possible values). CRC64 produces 16-character hex values with a 64-bit collision space (about 18 quintillion values), making accidental collisions far less likely for large file sets.
Comparison with similar methods
| Method | Complexity | Typical use |
|---|---|---|
| CRC64 (ECMA-182 reflected) | O(n), table-driven, 64-bit | XZ archives, database engines |
| CRC32 (IEEE 802.3) | O(n), table-driven, 32-bit | Ethernet, PNG, zlib, gzip |
| Adler-32 | O(n), simple modular sums | zlib/gzip fallback checksum |
| MD5 | O(n), cryptographic, 128-bit | File integrity (deprecated for security) |
Limitations or considerations
CRC64 is a checksum, not a cryptographic hash. It detects accidental corruption but provides no security against intentional tampering. An attacker can modify data and adjust the CRC64 to match. For security-sensitive integrity verification, use SHA-256 or BLAKE2. This tool processes text input only and cannot directly checksum binary files. The implementation uses the ECMA-182 reflected variant; other CRC64 variants (like the ISO 3309 or Weckerle variant) will produce different values for the same input.
Frequently asked questions
What CRC64 variant does this tool use?
This tool uses the ECMA-182 reflected variant with polynomial 0x42F0E1EBA9EA3693 (reflected as 0xC96C5795D7870F42), init value 0xFFFFFFFFFFFFFFFF, and final XOR 0xFFFFFFFFFFFFFFFF. This is the same variant used by XZ Utils and the Linux kernel's crc64 library function.
Why does my CRC64 not match another tool's output?
There are multiple CRC64 variants with different polynomials, init values, and reflection settings. The most common variants are ECMA-182 (used here), ISO 3309, and the Jones variant. Check which variant the other tool uses and compare.
Is CRC64 better than CRC32?
CRC64 has a larger checksum space (64 bits vs 32 bits), so it has a lower collision probability for large data sets. For most practical file integrity purposes, CRC32 is sufficient. CRC64 is preferred when the data set is large enough that CRC32 collisions become a concern (roughly 65,000+ files by birthday bound).
Can CRC64 detect all errors?
No. CRC64 detects all 1-, 2-, and 3-bit errors and most burst errors up to 64 bits for messages shorter than 2^64 - 1 bits. It cannot detect all possible errors, and it provides no protection against intentional modification.
Conclusion
This CRC64 calculator gives you the ECMA-182 reflected checksum used by XZ Utils and several database engines. It runs entirely in your browser with a fast table-driven implementation. For related checksum tools, try the Adler-32 Checksum or the CRC32-based Checksum Calculator.