CRC-32 Calculator - Checksums for Text, Hex and Files
CRC-32 Checksum Calculator
Encoded as UTF-8 before hashing. 6 bytes
| Message length | 6 bytes |
| CRC-32 | 0xFF55531A |
| CRC-32b (trailing zero byte) | 0x2F9F43A4 |
CRC-32 detects accidental corruption in zip archives, gzip streams, PNG chunks and Ethernet frames. It is not a cryptographic hash: it is linear, trivially forged, and must never be used for integrity against an adversary.
What Is
A checksum is a short fixed-length summary of a longer message, computed so that any accidental change to the message is overwhelmingly likely to change the summary too. The idea is older than the personal computer. IBM built tabulating machines that read punched cards, and operators discovered that data moved between machines was now and then silently corrupted by a mis-punched column, a bent card or a worn reader. The engineering answer was to travel alongside the data with a redundant arithmetic value that the receiving machine recomputed and compared; if the two agreed the transfer was assumed intact, and if they disagreed the machine requested a retransmission. The modern descendants of that idea are cyclic redundancy checks. A CRC treats the message as a polynomial over GF(2), the field where adding and subtracting are both the exclusive-or operation, and computes a remainder when that polynomial is divided by a fixed generator polynomial. CRC-32 uses the generator 0x04C11DB7, and because the bit-reflected formulation is much cheaper to implement in both hardware and software than the straight one, real code works with the reversed constant 0xEDB88320 instead.
The usual implementation precomputes a 256-entry table by running that reversal loop over every possible byte, then processes the message one byte at a time with a single lookup and one shift: crc = table[(crc XOR byte) AND 0xFF] XOR (crc >> 8). That table is why a megabyte hashes in a couple of milliseconds, and building it from the definition rather than pasting a magic array guarantees the code implements what it claims to. The register is seeded with 0xFFFFFFFF before the first byte and the result is XORed with 0xFFFFFFFF on the way out, a technique called augmentation. Neither XOR is decoration. With a zero seed, leading zero bytes leave the register untouched, so the message 00 00 41 and the message 41 produce the identical value; seeding with all ones forces those bytes to be absorbed, which is what makes a run of zeros detectable. The final XOR guarantees that the message plus its own CRC, appended in little-endian order, leaves the fixed residue 0x2144DF1C that a receiver checks for, and it is why the CRC of an empty message is the tidy 0x00000000 rather than a run of ones. CRC-32 and CRC-32b are the same algorithm with different framing: the variant this tool reports appends one trailing 0x00 byte before hashing, which is the convention some protocols use to distinguish a payload from its terminator, while other sources use the name for the BZIP2 variant that appends four zero bytes, so always state which framing you mean.
In real use, CRC-32 is the integrity field inside every ZIP entry, inside the trailer of every gzip and zlib stream, inside every individual chunk of a PNG file, inside MPEG-2 transport streams, and inside the Frame Check Sequence of every Ethernet frame, where it is abbreviated FCS. What CRC-32 is emphatically not is a cryptographic hash. It is a linear function over GF(2): XORing the same difference into two messages of equal length changes their CRCs by the same amount, which means an attacker who knows one message and its checksum can derive a four-byte patch that gives any checksum they like. It is also only 32 bits wide, so by the birthday paradox two distinct messages sharing a CRC appear after roughly the square root of 2^32, on the order of 65536 messages, and every incidental single-bit error you care about catching is caught. Use it for accidental corruption, never for integrity against someone who is trying.
How to Use
- Open the CRC-32 Calculator in your browser. The checksum is computed locally in JavaScript, so nothing you type or select is uploaded to any server.
- Choose an input mode with the three buttons at the top: Text for a string, Hex bytes for raw binary, or File to checksum an entire document.
- In Text mode, type or paste into the Input text box. The string is encoded as UTF-8 first, so accented characters and emoji count for more bytes than they look, and the byte count updates live underneath.
- In Hex mode, paste pairs of hex digits such as 48 65 6c 6c 6f. Spaces, commas and 0x prefixes are stripped automatically, an odd digit count is rejected, and any non-hex character raises an error instead of being silently ignored.
- In File mode, pick a file with the Choose a file control. The calculator reads it with the browser File API and reports the size on disk alongside the number of bytes actually hashed.
- Pick the representation you need from the Output format menu: Hex, Decimal, Octal, Binary or Base64. The CRC-32 result box re-renders instantly in whichever form is selected.
- Read the summary table for the exact message length in bytes, the CRC-32 value, and the CRC-32b value computed with a single trailing zero byte appended for comparison.
- Compare the value against a published checksum to confirm a download, an upload or a transferred payload arrived intact.
Examples
Input: Text mode, the string CRC-32
Process:
6 UTF-8 bytes 43 52 43 2D 33 32 through the table-driven loopResult: CRC-32 = 0xFF55531A, CRC-32b with a trailing zero byte = 0x2F9F43A4
Input: Text mode, the string 123456789
Process:
The ISO 3309 and ITU-T V.42 check value for the CRC-32/BZIP2 variantResult: 0xCBF43926 — if your implementation disagrees, the parameters are wrong
Input: Hex mode, the bytes 48 65 6c 6c 6f
Process:
Five raw bytes meaning Hello, entered as hex rather than textResult: 0xF7D18982 — different from hashing the word Hello as text would give
Input: File mode, an empty or zero-length file
Process:
The loop never executes, so the seed passes straight through the final XORResult: 0x00000000, which is why the empty message is easy to recognise
Related Searches
People also search for: crc32 calculator, crc32 checksum, calculate crc32, checksum generator, file crc32, crc32 online.
crc32 calculatorcrc32 checksumcalculate crc32checksum generatorfile crc32crc32 onlinecrc32 hexcrc32 of textcrc32 of bytescrc32biso 3309itu-t v.420xedb88320verify file integrityzip crc32gzip checksumpng chunk crcethernet fcscrc32 base64crc32 vs sha256
Frequently Asked Questions
What is CRC-32 actually used for in real software?
CRC-32 is used wherever a cheap, near-certain check for accidental corruption is worth more than a security guarantee. Every ZIP archive stores one per entry in its central directory, and unzip verifies it on extraction so a truncated or bit-rotted file is reported instead of silently producing garbage. gzip and zlib append a CRC-32 to their compressed streams, which is why a corrupted .gz file produces a checksum error rather than a mysterious decompression error. PNG stores a CRC-32 in every single chunk, both to validate each chunk independently and to let a decoder stop at the first bad chunk. MPEG-2 transport streams carry one per packet, and the Ethernet frame check sequence is a CRC-32, computed in hardware on every frame that crosses a switch. In each case the threat model is the same: noise, hardware decay, partial writes and mismatched versions, not a motivated attacker.
Is CRC-32 a cryptographic hash? Can I use it for passwords?
No, and using it for passwords or for authenticating a download from an untrusted source would be a serious mistake. A CRC is a linear function over the field GF(2), which means XORing the same difference into two messages produces the same difference in their checksums. Anyone who knows one message and its checksum can therefore construct a different message, differing in as few as four bytes, that carries any checksum they choose. That is a forgery requiring no cleverness and no search. CRC-32 is also only 32 bits wide, so an attacker can precompute a collision in a few seconds of GPU time for a chosen plaintext. It has no key, no salt, no work factor and no avalanche behaviour, so it provides none of the one-wayness, unpredictability or brute-force resistance that password storage or code signing depends on. Use a cryptographic hash such as SHA-256 for integrity against an adversary, and a password-specific function such as Argon2id or bcrypt for anything credential-shaped.
Why does CRC-32b give a different answer from CRC-32?
Because the two names describe the same algorithm wrapped around slightly different framing. The CRC-32b row in this calculator runs the identical algorithm over your bytes with one trailing 0x00 byte appended, and that extra byte changes the register state, so every value shifts. The purpose of such a variant is to distinguish a payload from its own terminator, so a stream that legitimately ends in a zero byte cannot be confused with one that ends there by accident. Worth knowing: the term is used inconsistently in the wild. The BZIP2 variant, usually written CRC-32/BZIP2 and the one identified by the standard check value 0xCBF43926 for the string 123456789, appends four zero bytes rather than one, and is a different function again. If you are interoperating with a specific tool or format, check what that implementation actually appends instead of trusting the name.
What does the constant 0xEDB88320 mean?
It is the reversed form of the CRC-32 generator polynomial 0x04C11DB7, and it appears in essentially every software implementation of CRC-32 you will meet. The generator polynomial defines which bit patterns are treated as errors. Its normal, forward bit order is the textbook representation, but the reflected order lets the whole computation run right to left through the bytes, which needs one table lookup and one shift per byte instead of eight conditional shifts. In the reflected implementation the polynomial value 0x04C11DB7 reverses to 0xEDB88320, and each of the 256 table entries is generated by starting from a byte value and applying that reversal loop eight times: if the low bit is set, XOR the accumulator with 0xEDB88320 and shift right, otherwise just shift right. Building the table from that definition, as this tool does, is safer than pasting a 256-entry array, because it removes any chance of the shipped table drifting away from the definition it claims to implement.
Why do two different files sometimes end up with the same CRC-32?
Because the output space is only 32 bits, so there are roughly 4.3 billion distinct checksums to share among every possible message, and some messages must inevitably share one. Working through the birthday paradox, the number of messages you need before a collision becomes likely is about the square root of 2^32, which is 65536, so random data hits a duplicate CRC somewhere in that region. Real files are worse than random, because structured documents differ in a few predictable places. This is not a flaw in the design, it is the design working as intended. A CRC-32 catches every single-bit error and every burst error up to 32 bits with certainty, which covers essentially all accidental corruption from noise, decay and bad transfers. What it cannot do is establish identity against an adversary, because an adversary can construct a collision deliberately in seconds. If you need collision resistance, you need a cryptographic hash.
How do I verify that a downloaded file is not corrupted?
Compute the CRC-32 of the file here and compare it with the checksum the publisher or transfer system recorded. If they match, the file arrived without corruption. Many tools already do this for you, since unzip verifies each entry, gzip and zlib verify the stream trailer, and browsers verify PNG chunks while decoding, but computing the value yourself is the quickest way to confirm what a specific tool produced, and it is the only way when you have an unusual format with no built-in verification. Choose File mode, select the download, and read the CRC-32 of file output. One important caveat: a matching CRC-32 proves the file is the one the publisher generated only if you trust the publisher. If the download could have been tampered with in transit, an attacker with that ability can craft a different file with the same checksum, which is exactly why signed releases such as GPG or Sigstore signatures exist alongside checksums.
Does my file or text get uploaded to a server?
No. The calculator is a client-side component: the JavaScript in your browser reads your text, your hex bytes or the file you selected, builds the CRC-32 table in memory and runs the checksum loop locally. Nothing is transmitted over the network, nothing is written to a server log, and nothing is persisted after you close the tab. For file mode this is implemented with the browser File API, which reads the file from your local disk into memory on demand. That matters practically, not just for privacy: you can checksum a multi-gigabyte disk image or a confidential archive without waiting on an upload, and without handing a third-party service a copy of data that may be regulated or personally identifying.