The standard check value
123456789
cbf43926
Every correct CRC32 (IEEE) implementation gives this value for "123456789".
Calculate the CRC32 checksum of text or a file, the same check used inside ZIP, gzip and PNG files. Paste an expected value to verify a file.
123456789
cbf43926
Every correct CRC32 (IEEE) implementation gives this value for "123456789".
hello
3610a686
Always 8 hex characters (32 bits).
The quick brown fox jumps over the lazy dog
414fa339
A common CRC32 test value.
CRC32 (32-bit Cyclic Redundancy Check) is a checksum designed to detect accidental changes to data, such as bit flips during storage or transmission. It treats the data as a long binary polynomial and divides it by a fixed generator polynomial; the 32-bit remainder is the checksum. It is extremely fast and is built into network hardware.
CRC32 is linear: it is easy to change a file and adjust a few bytes so the CRC stays the same, and with only 32 bits, collisions also happen by chance in large collections (about one in 77,000 random files share a CRC with another, by the birthday paradox). Use SHA-256 to detect deliberate changes.
| Name | Polynomial | Used by | 123456789 |
|---|---|---|---|
| CRC-32 (IEEE 802.3) | 0x04C11DB7 (reflected 0xEDB88320) | ZIP, gzip, PNG, Ethernet, PHP crc32() | cbf43926 |
| CRC-32C (Castagnoli) | 0x1EDC6F41 | iSCSI, ext4, Btrfs, Google Cloud Storage | e3069283 |
| CRC-32/BZIP2 | 0x04C11DB7 (not reflected) | bzip2 | fc891918 |
This tool calculates the standard IEEE CRC32, the one most people mean by "CRC32".
dechex(crc32('hello')); // "3610a686"hash('crc32b', 'hello'); // "3610a686" (crc32b = IEEE CRC32)import zlibformat(zlib.crc32(b'hello'), '08x') # '3610a686'// Node.js 20.15+ / 22.2+import zlib from 'node:zlib';zlib.crc32('hello').toString(16); // "3610a686"gzip -c file | tail -c8 | od -t x4 -N 4 -A n # CRC stored in a gzip filePHP hash("crc32", …) gives a different value
In PHP, crc32 in hash() is the bzip2 variant. Use hash("crc32b", …) or crc32() for the standard IEEE CRC32.
The value is negative in my code
Some languages return CRC32 as a signed 32-bit integer. Convert it to unsigned (>>> 0 in JavaScript, & 0xffffffff in Python 2) before formatting as hex.
My CRC has fewer than 8 characters
Leading zeros were dropped. Pad the hex value to 8 characters: 000a1b2c, not a1b2c.
It is a checksum: like a hash it maps data to a short value, but it only protects against accidental errors, not deliberate changes.
32 bits: 8 hexadecimal characters.
cbf43926 for the standard IEEE CRC32. It is the official check value used to test implementations.
No. The checksum is calculated in your browser.
Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.
Tip: press Ctrl D to bookmark dev247.