CRC32 Calculator

Compute CRC32 checksum of text for error detection and data integrity verification.

Back to all tools on ToolForge

More in Security & Tokens



CRC32 Result

About CRC32 Calculator

This CRC32 calculator computes the 32-bit Cyclic Redundancy Check checksum of any text input. CRC32 is widely used for detecting accidental data corruption in file transfers, archive verification, and network communications.

The calculation uses the standard CRC-32 polynomial (0xEDB88320) compatible with ZIP, PNG, GZIP, Ethernet, and many other formats.

How CRC32 Works

The CRC32 algorithm processes input data byte by byte:

  1. Initialize: Start with CRC = 0xFFFFFFFF (all bits set)
  2. Process each byte: XOR the byte with the lowest byte of CRC
  3. Table lookup: Use the result as index into a precomputed 256-entry table
  4. Update CRC: Shift CRC right 8 bits, XOR with table value
  5. Finalize: XOR final CRC with 0xFFFFFFFF to get result

CRC32 Algorithm Implementation

// Generate CRC32 lookup table
function makeCRCTable() {
  const table = [];
  for (let n = 0; n < 256; n++) {
    let c = n;
    for (let k = 0; k < 8; k++) {
      c = (c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1);
    }
    table[n] = c;
  }
  return table;
}

// Calculate CRC32 checksum
function crc32(data) {
  const table = makeCRCTable();
  const bytes = new TextEncoder().encode(data);
  let crc = 0 ^ (-1);

  for (let i = 0; i < bytes.length; i++) {
    crc = (crc >>> 8) ^ table[(crc ^ bytes[i]) & 0xFF];
  }

  return (crc ^ (-1)) >>> 0;
}

// Output as hexadecimal
const checksum = crc32("Hello World").toString(16);
// Output: "559d8f05"

CRC32 Use Cases

ApplicationPurposeExample
File ArchivesVerify extracted files match originalsZIP, RAR, 7Z checksums
Image FormatsDetect PNG file corruptionPNG chunk CRC checks
CompressionVerify decompressed dataGZIP, ZLIB integrity
Network ProtocolsDetect transmission errorsEthernet frames, SATA packets
Database SystemsPage integrity verificationPostgreSQL page checksums
Backup SystemsQuick change detectionrsync file comparison

CRC32 Checksum Examples

Input: "" (empty string)
CRC32: 00000000

Input: "Hello World"
CRC32: 559d8f05

Input: "The quick brown fox jumps over the lazy dog"
CRC32: 414fa339

Input: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
CRC32: 360794d8

Input: "123456789"
CRC32: cbf43926  (standard test vector)

CRC32 vs Other Checksums

AlgorithmBitsSpeedUse Case
CRC3232Very FastError detection, file integrity
MD5128FastLegacy hash (deprecated for security)
SHA-1160ModerateLegacy hash (deprecated for security)
SHA-256256SlowerSecure hashing, integrity verification
Adler3232FastestZLIB compression (less reliable than CRC32)

Understanding CRC32 Output

Limitations of CRC32

Common Applications

Frequently Asked Questions

What is CRC32 and how does it work?
CRC32 (Cyclic Redundancy Check 32-bit) is an error-detecting algorithm that produces a 32-bit checksum. It treats input data as a large polynomial and divides it by a fixed generator polynomial (0xEDB88320). The remainder becomes the checksum. Any change in input data produces a different CRC32 value with high probability.
What is CRC32 used for?
CRC32 is used for: detecting data corruption in file transfers, verifying archive integrity (ZIP, GZIP, PNG), network packet error detection (Ethernet, SATA), checksum verification in backup systems, and quick data comparison. It's fast but not cryptographically secure.
Is CRC32 secure for password hashing?
No. CRC32 is not cryptographically secure. It's designed for error detection, not security. CRC32 can be easily reversed and collisions can be intentionally created. For passwords, use bcrypt, scrypt, Argon2, or PBKDF2. For integrity verification, use SHA-256 or HMAC.
What is the CRC32 polynomial?
The standard CRC32 polynomial is 0xEDB88320 (reversed representation of 0x04C11DB7). This is the CRC-32 polynomial used in IEEE 802.3, ZIP, PNG, and many other standards. The polynomial determines how bits are XORed during the calculation.
How accurate is CRC32 for error detection?
CRC32 detects all single-bit errors, all two-bit errors, all odd-numbered bit errors, and all burst errors up to 32 bits. For random errors, the detection rate is 99.99999997% (1 in 2^32 chance of undetected error). However, intentional collisions are easy to create.
What is the difference between CRC32 and hash functions?
CRC32 is for error detection (accidental changes), while cryptographic hashes (SHA-256, MD5) are for security (intentional tampering). CRC32 is faster but produces only 32 bits. Hash functions produce longer outputs (128-512 bits) and are collision-resistant but slower.