calculate crc32 of a file
Calculate CRC32 of a File: Match the 8-Digit Checksum

What "Calculate CRC32 of a File" Actually Covers

CRC-32/ISO-HDLC of a file is the eight-digit lowercase hexadecimal value produced by feeding the file's covered bytes through a reflected polynomial 0xEDB88320 with initial register 0xFFFFFFFF and final XOR 0xFFFFFFFF. For the ASCII bytes 123456789 the standardized check value is cbf43926, which is how different implementations recognize the same variant. "Calculate CRC32 of a file" therefore means deciding which bytes of the file belong to the covered range, turning those bytes into either UTF-8 text or raw hexadecimal pairs, and producing an unsigned 32-bit result that is formatted as exactly eight hex digits with leading zeros preserved.

Most readers land here because a download page, a build script, or a colleague published a value like cbf43926 next to a file and asked them to confirm it matches. The challenge is rarely the arithmetic and almost always the byte range: did the published value cover the raw bytes, a header plus the body, or a stripped-down body without length fields? Getting that wrong produces a result that disagrees with every other tool, even when every tool is correct.

How to Calculate CRC32 of a File With the Browser Tool

The CRC32 Calculator accepts either UTF-8 text or exact hexadecimal bytes and returns the CRC-32/ISO-HDLC value as an eight-digit lowercase hex string. Calculation happens entirely in the browser, the input is not uploaded, and the copy action copies only the 32-bit value, which keeps confidential payloads off the network.

  1. Identify the required CRC variant and the exact byte range. This page implements only CRC-32/ISO-HDLC, the reflected polynomial 0xEDB88320 variant used by gzip, ZIP, PNG and most general-purpose archive and image formats.
  2. Confirm the variant by checking the standard value: for the ASCII bytes 123456789 the result must be cbf43926. A different expected value means the other system uses a different 32-bit formula such as CRC-32C, Koopman, MPEG-2, BZIP2 or JAMCRC.
  3. Pick the input mode. Choose UTF-8 text only when the spec describes the covered payload as a string; choose hexadecimal bytes when the spec describes the payload as exact bytes, headers, length fields, or stored CRC bytes.
  4. Enter the payload exactly. Hex mode ignores whitespace between byte pairs but requires an even number of digits, rejects 0x prefixes and odd trailing nibbles, and preserves leading 00 bytes.
  5. Calculate, then compare all eight digits of the result with the expected value, including leading zeros. A match is evidence of accidental-error consistency only, not authenticity.

Where Each File Format Starts and Ends the Covered Bytes

File formats do not all cover the same bytes. The most common reason two correct implementations disagree is that one includes a header or length field and the other does not. The table below lists the canonical ranges for formats that use CRC-32/ISO-HDLC.

FormatCovered bytesStored where
gzip (RFC 1952)Uncompressed original bytes, computed before compressionTrailer, little-endian, before ISIZE
PNGChunk type code plus chunk data, for every IDAT and ancillary chunk that uses CRC4-byte big-endian trailer on each chunk
ZIP local file headerBytes from the signature through the file name and extra field, excluding the data descriptor4-byte little-endian field in the local header
ZIP central directory entryBytes from the central directory header signature through the end of the file comment4-byte little-endian field in the central directory entry
ZIP data descriptorOptional 4-byte signature, then CRC32, then compressed and uncompressed sizesAfter file data when bit 3 of the general purpose flag is set

When verifying a downloaded file, locate the stored value first, then confirm what bytes the spec says are covered, then feed only those bytes into the calculator. For deeper guidance on format-specific byte ranges for ZIP, PNG and gzip, see how to calculate CRC32 for ZIP, PNG and gzip files.

Matching the Eight-Digit Result Correctly

The output is formatted as exactly eight lowercase hexadecimal digits and the value is treated as unsigned, so leading zeros are always shown. A leading 0x00 byte is preserved as input and affects the final eight-digit output, and additional leading 0x00 bytes continue to affect the result. Trimming leading zeros or uppercasing the result is therefore a frequent cause of "almost matches" reports.

The calculator uses a 256-entry table built from the reflected polynomial 0xEDB88320, processes each byte least-significant bit first, and complements the register with 0xFFFFFFFF before formatting. This is the practical table-driven method described in RFC 1952 for gzip and matches the algorithm documented in the zlib checksum manual. Cross-checking with zlib's crc32 function on the same byte sequence is a fast way to confirm a discrepancy is in the byte range rather than the algorithm.

Common Variant and Byte-Range Mistakes

Several 32-bit CRC formulas exist with different polynomials, initial values, or final XOR constants. The distinguishing parameters are listed below.

VariantReflected polynomialInitFinal XORCheck for "123456789"
CRC-32/ISO-HDLC (this tool)0xEDB883200xFFFFFFFF0xFFFFFFFFcbf43926
CRC-32C (Castagnoli)0x82F63B780xFFFFFFFF0xFFFFFFFFe3069283
CRC-32/MPEG-20x04C11DB70x000000000x000000000376E6E7
CRC-32/BZIP20x04C11DB70xFFFFFFFF0xFFFFFFFFFC891918
CRC-32/JAMCRC0xEDB883200xFFFFFFFF0x00000000340BC6D9

If the expected value for 123456789 is not cbf43926, the source is using a different 32-bit formula. Equally common: retyping the covered bytes as visible text and losing the difference between CR LF and LF, between UTF-8 and UTF-16, between NFC and NFD normalization, or between raw bytes and a Base64 representation of the bytes. When the protocol hands you bytes, paste bytes; when it hands you text, confirm the encoding is exactly UTF-8 with no BOM and no normalized newline conversion.

CRC32 Is Not a Security or Authenticity Check

CRC-32 is a cyclic redundancy check designed to detect common accidental changes in data, such as flipped bits on a flaky disk or a truncated download. It is linear and trivially manipulable: anyone who wants a payload that hashes to a chosen 32-bit value can construct one without knowing the original. CRC32 is not encryption, not a cryptographic hash, not a message authentication code, and not a digital signature.

Use it to confirm that an archive you extracted matches the value published alongside it, or that a file you wrote to disk still matches what was in memory. Do not use it to verify untrusted software, authorize commands, protect credentials, or establish that a file came from a trusted publisher. For adversarial integrity, distribute the file over an authenticated channel and publish a SHA-256 or stronger cryptographic digest alongside it.

File Size Limits and What to Do With Larger Files

The browser tool processes up to 5,000,000 bytes of input so the table-driven loop remains responsive in the page. Output is never silently truncated: eight hexadecimal digits are always displayed and the value is treated as unsigned, so the result for any accepted input is the complete 32-bit check value. Empty programmatic input has CRC 00000000, although the interface asks for data so an accidental empty click does not look like a meaningful verification.

For larger payloads, split the input into chunks no larger than the limit, compute each chunk's CRC32 over its own bytes, then combine the chunk values using the streaming properties of the algorithm. If the downstream consumer already provides a reference value, prefer a tool that reads the file directly from disk or streams it so the entire file is hashed in one pass without manual chunking.