Skip to content

↑↓ navigate ↵ open Esc close Search runs locally

CRC32 Checksum Calculator (Text & Files)

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.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up
Algorithms
0 BUTF-8
Hashes

    Runs in your browser. Files are never uploaded. Tip: drop a file to verify a download

    How to use the CRC32 tool#

    1. Type or paste text, or drop a file onto the left box.
    2. The 8-character CRC32 checksum appears on the right. Tick Uppercase if your reference uses capitals.
    3. Paste an expected value into Compare with a checksum to verify a file.
    4. For protection against tampering, also select SHA-256: CRC32 only detects accidental errors.

    Examples#

    The standard check value

    Input
    123456789
    Output
    cbf43926

    Every correct CRC32 (IEEE) implementation gives this value for "123456789".

    CRC32 of a word

    Input
    hello
    Output
    3610a686

    Always 8 hex characters (32 bits).

    The classic test sentence

    Input
    The quick brown fox jumps over the lazy dog
    Output
    414fa339

    A common CRC32 test value.

    What is CRC32?#

    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.

    Where CRC32 is used#

    • ZIP and gzip: every compressed file stores the CRC32 of its contents, which is how "CRC error" messages are detected when unpacking.
    • PNG: every chunk of a PNG image ends with a CRC32.
    • Ethernet and SATA: frames and disk transfers are checked with CRC32 in hardware.
    • Quick change detection: comparing CRCs is a cheap way to see if a file changed.

    CRC32 is not a security hash#

    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.

    CRC32 variants#

    NamePolynomialUsed by123456789
    CRC-32 (IEEE 802.3)0x04C11DB7 (reflected 0xEDB88320)ZIP, gzip, PNG, Ethernet, PHP crc32()cbf43926
    CRC-32C (Castagnoli)0x1EDC6F41iSCSI, ext4, Btrfs, Google Cloud Storagee3069283
    CRC-32/BZIP20x04C11DB7 (not reflected)bzip2fc891918

    This tool calculates the standard IEEE CRC32, the one most people mean by "CRC32".

    CRC32 in code#

    php
    dechex(crc32('hello'));        // "3610a686"hash('crc32b', 'hello');       // "3610a686" (crc32b = IEEE CRC32)
    python
    import zlibformat(zlib.crc32(b'hello'), '08x')   # '3610a686'
    javascript
    // Node.js 20.15+ / 22.2+import zlib from 'node:zlib';zlib.crc32('hello').toString(16);   // "3610a686"
    bash
    gzip -c file | tail -c8 | od -t x4 -N 4 -A n   # CRC stored in a gzip file

    Common errors and fixes#

    • PHP 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.

    Frequently asked questions#

    Is CRC32 a hash?

    It is a checksum: like a hash it maps data to a short value, but it only protects against accidental errors, not deliberate changes.

    How long is a CRC32?

    32 bits: 8 hexadecimal characters.

    What is the CRC32 of "123456789"?

    cbf43926 for the standard IEEE CRC32. It is the official check value used to test implementations.

    Is my file uploaded?

    No. The checksum is calculated in your browser.

    Your next tool is one search away.

    Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.

    Browse all tools

    Tip: press Ctrl D to bookmark dev247.