CRC32 Checksum Calculator

Calculate the CRC-32 or CRC-32C checksum of text, hex bytes or a whole file, show it as hex, decimal or Base64, and compare it with an expected value. Files are read locally and never uploaded.

All algorithms

Runs entirely in your browser. Nothing is uploaded.

How to use

  1. Type or paste text, switch the input to Hex for raw bytes, or open a file to checksum its contents.
  2. Keep CRC-32 for ZIP, gzip and PNG, or choose CRC-32C for iSCSI, ext4, Btrfs and Google Cloud Storage.
  3. Choose the output: lowercase hex, uppercase hex, decimal or Base64.
  4. To verify, paste the expected checksum into Compare with, as hex without 0x, as decimal or as Base64.

What a CRC32 checksum is

A cyclic redundancy check treats the input as one long binary polynomial, divides it by a fixed generator polynomial and keeps the remainder. For CRC-32 the remainder has 32 bits, usually written as 8 hex digits or as an unsigned number from 0 to 4,294,967,295. Almost any change to the data changes the remainder.

CRCs are designed for the errors that real cables, radios and disks produce. CRC-32 detects every burst of corrupted bits up to 32 bits long, and a random corruption goes unnoticed only about once in 4.3 billion cases. It is also very fast to compute, which is why it is built into ZIP, gzip, PNG and Ethernet frames.

CRC-32 and CRC-32C

CRC-32CRC-32C (Castagnoli)
Polynomial0x04C11DB7, reflected 0xEDB883200x1EDC6F41, reflected 0x82F63B78
Check value of 123456789cbf43926e3069283
Used byZIP, gzip, PNG, EthernetiSCSI, SCTP, ext4 metadata, Btrfs, Google Cloud Storage
Hardware supportARMv8 CRC32 instructionsx86 SSE4.2 crc32 instruction, ARMv8

Both start from 0xFFFFFFFF, process the bits of each byte least significant first and invert the final value; only the polynomial differs, so the same data gives two unrelated results. The first is what most tools mean by "CRC32" and is catalogued as CRC-32/ISO-HDLC. CRC-32C was adopted later by storage and network protocols for its stronger error detection. Google Cloud Storage reports CRC-32C, and Amazon S3 either variant, as Base64 of the four bytes in big-endian order, which is exactly what the Base64 output shows.

A checksum, not a security check

A CRC protects against accidents, not attacks. It is a linear function, so anyone can modify a file and then adjust four bytes to keep its CRC-32 unchanged. A matching CRC therefore proves nothing about deliberate tampering. To check a download, compare a SHA-256 hash from a trusted source; to prove who sent a message, use an HMAC.

32 bits is also too few to identify data. Among about 77,000 random files, the chance that two share the same CRC-32 already reaches 50%, so do not use it as a unique ID or a deduplication key. Where no attacker is involved, MD5 or SHA-256 make far better fingerprints.

CRC32 in code

# Python: zlib.crc32 is unsigned in Python 3;
# "& 0xffffffff" is only needed for Python 2
import zlib
format(zlib.crc32(b'123456789'), '08x')    # 'cbf43926'

// Node.js 20.15+ and 22.2+
require('zlib').crc32('123456789').toString(16).padStart(8, '0')   // 'cbf43926'

// Go (import "hash/crc32")
crc32.ChecksumIEEE(data)                                   // CRC-32
crc32.Checksum(data, crc32.MakeTable(crc32.Castagnoli))    // CRC-32C

// Java: java.util.zip.CRC32, and java.util.zip.CRC32C since Java 9

// PHP
sprintf('%08x', crc32('123456789'));   // 'cbf43926'
hash('crc32b', '123456789');           // 'cbf43926', the same CRC-32
hash('crc32c', '123456789');           // 'e3069283'
hash('crc32', '123456789');            // '181989fc', a different CRC

Watch the names in PHP: the hash algorithm called crc32 is not the ZIP checksum but the CRC used by bzip2, printed in reverse byte order. Use crc32b or the crc32() function to match ZIP, gzip and this tool. The Unix cksum command uses yet another variant that also mixes in the file length, so its number will not match either.

Examples

Input (UTF-8)CRC-32
Hello, World!ec4ac3d0
Base64.is915d7207
你好50a2b841

Frequently asked questions

What is the CRC32 of "123456789"?
This string is the standard test input for CRC algorithms. Its CRC-32 is cbf43926 (3421780262 in decimal) and its CRC-32C is e3069283. If your own implementation returns these values, it uses the same parameters as this tool.
Why does my CRC32 differ from another tool?
Check four things: the variant (CRC-32, CRC-32C, the bzip2 CRC and POSIX cksum all give different results), the input bytes (line endings, a trailing newline, the text encoding), the number format (some languages return a signed 32-bit integer, which makes large values negative), and the byte order.
Why are the CRC bytes reversed inside my ZIP or gzip file?
ZIP and gzip store the CRC-32 in little-endian byte order, so a hex editor shows the four bytes in reverse compared with the usual notation. PNG stores it big-endian. This tool, unzip -v and most other programs print the most significant byte first.
Can I calculate the CRC32 of a large file?

Yes. Click Open file and the checksum is computed from the file's bytes on your device, without uploading it; any file your browser can hold in memory works. You can then compare the result with the value in an SFV file or a ZIP listing.

Is CRC32 a hash function?

It maps data of any length to a fixed 32-bit value, so it is often listed with hashes, but it is a checksum: it detects accidental errors and offers no protection against someone who changes the data on purpose. When you need a stronger fingerprint, the All algorithms table below the result shows MD5 and the SHA family for the same input.