Skip to content
Aback ZIP

Basics · 5 min read · Updated

What is CRC-32?

CRC-32 is the four-byte checksum ZIP uses to spot accidental corruption. Learn how it is computed, what it can and cannot prove, and how to verify it locally.

CRC-32 stands for Cyclic Redundancy Check, 32-bit. It is a four-byte value computed from a file's bytes and stored in a ZIP so a reader can notice if the data changed. Test ZIP Integrity decompresses each entry and recomputes its CRC-32 to find corruption. It is a checksum for accidents, not a cryptographic signature or a password.

How CRC-32 is computed

The bytes of a file are processed through a fixed polynomial division, using the IEEE 802.3 polynomial, commonly written in its reversed form as 0xEDB88320. Implementations use a lookup table for speed. The output is always a 32-bit number, written in the ZIP header as four bytes. Any change to the input, even one flipped bit, produces a different value with overwhelming probability.

polynomial (reversed): 0xEDB88320
CRC-32("hello")       = 0x3610A686
stored in ZIP as     86 A6 10 36   (little-endian)

The exact constant above is from the ZIP specification; different CRC variants exist, but ZIP uses this one. Aback ZIP follows the standard algorithm, so its values agree with other archive tools.

Where the value lives in a ZIP

A ZIP stores each file with a local file header, the compressed data, and an entry in the central directory at the end of the archive. The CRC-32 is computed over the uncompressed contents and appears in both the local header and the central directory. Having it in the index is what allows a tool to compare values without reading the whole archive.

FormatWhere the checksum is storedComputed over
ZIP entryLocal file header and central directoryUncompressed file contents
GZIP fileLast eight bytes: four bytes CRC-32, four bytes uncompressed sizeUncompressed data of the single file
ZIP with WinZip AESStored CRC may be a placeholder; a separate authentication code protects the dataDecrypted contents, checked with AES authentication

ZIP Viewer shows the stored CRC-32 for every entry alongside sizes and compression methods. Seeing a value there does not mean it has been verified; the bytes have to be decompressed and recomputed first.

What a CRC-32 check actually tells you

  1. A mismatch means the decompressed bytes differ from the bytes used when the archive was built. Something changed during transfer, storage or creation.
  2. A match means the data is very likely unchanged by accident. It is strong evidence against random corruption, such as a partial download or a failing disk.
  3. A match says nothing about who created the file or whether it is safe to open. Checksums are not signatures and are not encryption.

Because the value is only 32 bits, different data can share a CRC-32. Collisions happen by chance in large collections and can be constructed deliberately. For anything where tampering matters, use a cryptographic hash such as SHA-256; check if a ZIP file is corrupted covers the practical workflow.

Never describe a matching CRC-32 as proof of authenticity or safety. The honest wording is that the entry passed an integrity check.

Compare CRC-32 with a cryptographic hash

PropertyCRC-32SHA-256
Length32 bits, four bytes256 bits, 32 bytes
PurposeDetect accidental corruptionDetect any change, including deliberate tampering
SpeedVery fastSlower, still fast on modern hardware
Collision resistanceNoneDesigned for it
Stored in ZIP headersYesNo; provide it separately

ZIP Checksum computes both kinds, for the archive as a whole and for every entry, and can export a manifest. Use CRC-32 for the everyday question "did the download arrive intact?" and SHA-256 when a publisher gives you a value to match.

Verify a ZIP the right way

  1. Open Test ZIP Integrity and choose the archive. Each entry is decompressed and its checksum recomputed and compared with the stored value.
  2. Read the per-file report. A single failed entry does not make the rest of the archive unreadable.
  3. If you need to compare two archives, use Compare ZIP: its quick mode matches paths by stored size and CRC-32, while its deep mode decompresses both and compares SHA-256 hashes.

If verification finds damage, Repair ZIP scans for file records and keeps entries whose checksums match. It cannot restore bytes that were never present, and it never invents a missing value.

CRC-32 in the wider archive world

The same four-byte field appears in GZIP, PNG and many other formats, each with its own scope: ZIP covers one entry, GZIP covers one compressed stream. It is deliberately simple and small, which is why it is still everywhere decades later. For a tour of the bytes around it, see inside a ZIP file, byte by byte, and for the formal definition see the PKWARE ZIP specification.

A worked example and why the design persists

Suppose a ZIP entry stores a 500-byte text file. The writer computes CRC-32 over those 500 uncompressed bytes and writes the result into the local header and again into the central directory. When you extract, the reader decompresses the data, computes CRC-32 over the recovered bytes and compares the two numbers. If a byte was lost or changed in transit, the numbers differ and the reader can report a bad CRC.

stored CRC   : 0x8a1f0c2d
computed CRC : 0x8a1f0c2d   -> match, data probably intact
computed CRC : 0x8a1f0c2e   -> mismatch, something changed

The comparison is deliberately simple. It needs four bytes of storage per entry, no key management and no server. That is why CRC-32 remains in ZIP, GZIP, PNG and countless protocols long after stronger hashes became available. It answers a narrow question extremely cheaply: did these bytes change by accident? A tool that needs to answer a different question, such as whether a file came from the person who claims to have sent it, has to use a digital signature or a separately supplied SHA-256 value.

QuestionRight tool
Did my download get cut off or altered by accident?CRC-32 check, as in Test ZIP Integrity
Does this file match the hash published by the developer?SHA-256, as in ZIP Checksum
Did two archives contain the same files?Compare ZIP, quick by CRC-32 or deep by SHA-256
Can I trust the sender or open this file safely?A signature from the sender and a security check, not any checksum

A single flipped bit always produces a different CRC-32, but many different corruptions can produce the same four-byte result. A checksum therefore tells you that something changed without telling you what changed. Repair tools use it as a filter: a recovered entry is accepted only when its recomputed value matches the stored one.

A CRC-32 value can be recomputed by anyone who changes the data. Never treat it as proof of origin or as a secret.

Tools for this

Frequently asked questions

No. It is a 32-bit checksum meant to detect accidental changes. Collisions can occur and can be constructed, so it cannot prove authenticity or detect deliberate tampering.

More guides