What is a CRC32 checksum?
CRC-32 is a 32-bit cyclic redundancy check: the remainder left after dividing your data, treated as one long binary number, by a fixed polynomial. Any accidental change to the data, such as a flipped bit on a disk or a dropped byte on a network, almost always changes that remainder. It's fast, tiny (8 hex digits) and everywhere in file formats.
You'll find this exact CRC in the gzip format (RFC 1952), in every chunk of a PNG image, and in ZIP archives, where each file's CRC is stored in its header so the extractor can tell whether it came out intact.
The parameters behind this tool's output
"CRC-32" names a family, so matching someone else's value means matching every parameter. This tool implements the variant the CRC catalogue lists as CRC-32/ISO-HDLC:
| Parameter | Value |
|---|---|
| Width | 32 bits |
| Polynomial | 0x04C11DB7 (0xEDB88320 in reflected form) |
| Initial value | 0xFFFFFFFF |
| Input and output reflected | Yes |
| Final XOR | 0xFFFFFFFF |
Check value (123456789) |
cbf43926 |
| Also known as | CRC-32, PKZIP, CRC-32/ADCCP, CRC-32/V-42, CRC-32/XZ |
The text is encoded as UTF-8 before checksumming, so é counts as two bytes. Output is always 8 lowercase hex digits, zero-padded: hello world gives 0d4a1185, not d4a1185. An empty box gives no output rather than the empty-input CRC.
A quick worked example
- Type
123456789and click Generate. You getcbf43926, the standard check value, which confirms the variant. - Replace the input with
hello world. The CRC is0d4a1185. - Capitalize the H.
Hello worldgives8bd69e52.
Python's standard library agrees, which is handy when you want to script the same check:
import zlib
format(zlib.crc32(b"hello world"), "08x") # '0d4a1185'
Recent Node.js versions include zlib.crc32(), and PHP offers hash('crc32b', $text).
Other CRC-32s you might be asked to match
If your value doesn't agree with a device or library, it probably uses another member of the family. These are their check values for 123456789, all from the catalogue:
| Variant | Differs by | Check value |
|---|---|---|
| CRC-32/ISO-HDLC (this tool) | cbf43926 | |
| CRC-32/BZIP2 | Not reflected | fc891918 |
| CRC-32/MPEG-2 | Not reflected, no final XOR | 0376e6e7 |
| CRC-32/JAMCRC | No final XOR | 340bc6d9 |
| CRC-32C (CRC-32/ISCSI) | Castagnoli polynomial 0x1EDC6F41 | e3069283 |
CRC-32C deserves a mention because it's common in storage and networking; iSCSI (RFC 3720) uses it, and many CPUs have an instruction for it. JAMCRC is simply the bitwise NOT of the standard result, which is why 340bc6d9 and cbf43926 add up to ffffffff.
What CRC32 is not
A CRC is linear arithmetic with no secret, which makes it great at catching noise and useless against a person. Someone who edits a file can recompute the CRC, or append four chosen bytes so the CRC doesn't change at all. Use it to answer "did this get corrupted?", never "did someone change this?". For that you need a keyed HMAC or a signature over a cryptographic hash such as SHA-256.
Thirty-two bits is also a small space. With only about 4.3 billion possible values, the birthday bound says that among roughly 77,000 random inputs there's about a 50% chance two share a CRC. That's fine for spotting corruption in one file, and a bad idea for deduplicating millions of records by CRC alone. An MD5 generator or a SHA hash gives you far more room.
For shorter frames on serial links and embedded protocols, a 16-bit CRC is often enough; the CRC-16 calculator covers those variants.
Last updated