CRC Calculator: CRC-8, CRC-16, CRC-32, CRC-64 Online
Calculate CRC-8, CRC-16, CRC-32 and CRC-64 checksums of text, hex bytes or a file in your browser. Every common preset from the CRC RevEng catalogue at once, plus custom models. Nothing is uploaded.
- CRC-32
- 00000000
- Decimal 0
- CRC-32C
- 00000000
- Decimal 0
- CRC-32/BZIP2
- 00000000
- Decimal 0
- CRC-32/MPEG-2
- ffffffff
- Decimal 4294967295
- CRC-32/CKSUM
- ffffffff
- Decimal 4294967295
About the CRC Calculator
The CRC Calculator computes cyclic redundancy checks of text, hex bytes or a file. Pick a width of 8, 16, 32 or 64 bits and every common CRC of that width is listed at once, each with its own Copy button, in hexadecimal and in decimal. A Custom section takes any model you can describe with six parameters. Everything runs in your browser; your text and files are never uploaded.
How to use it
Steps
- Choose Text to check the UTF-8 bytes of what you type, or Hex to paste raw bytes such as
31 32 33or0x313233. Or press Choose file for a file of up to 50 MB. - Pick the CRC width. All presets of that width appear together, so you can find the one that matches the value you expect.
- Turn on Upper case if the system you compare with prints capital hex digits.
- For a model that is not listed, fill in Custom: width, poly, init, xorout in hex, and whether input and output are reflected.
Privacy
Every CRC is computed by code on this page, in your browser. Your text and files are never uploaded to our servers, and nothing is kept once you close or reload the tab.
What a CRC is for
Detecting accidental errors
A CRC treats the data as a long binary polynomial and keeps the remainder after dividing it by a fixed generator polynomial. Small accidental changes, such as a flipped bit, a burst of noise on a serial line or a damaged disk sector, almost always change that remainder. That is why CRCs guard Ethernet frames, Zip and PNG files, Modbus messages, SD cards and storage controllers.
Not a cryptographic hash
A CRC is linear, so anyone can change data and adjust a few bytes to restore the same CRC on purpose. It protects against accidents, not attackers. To prove that a file has not been tampered with, compare a SHA-256 digest from the Hash Generator against one obtained from a trusted source.
The parameter model
Six parameters
Every CRC on this page is described by the Rocksoft model from Ross Williams' A Painless Guide to CRC Error Detection Algorithms. Width is the size of the result in bits. Poly is the generator polynomial without its top bit. Init is the register value before the first byte. Refin reflects each input byte, so its least significant bit is processed first. Refout reflects the final register. Xorout is XORed into the result at the end.
Check values
The catalogue publishes a check value for every model: its CRC of the nine ASCII characters 123456789. Type 123456789 here and each preset shows exactly its published check value, which is also the quickest way to confirm a custom model before you rely on it.
Presets
- 8 bits: CRC-8 (CRC-8/SMBUS), CRC-8/MAXIM-DOW used by 1-Wire sensors, and CRC-8/AUTOSAR.
- 16 bits: CRC-16/ARC, CRC-16/MODBUS, CRC-16/IBM-3740 (often called CCITT-FALSE), CRC-16/XMODEM, CRC-16/KERMIT, CRC-16/USB and CRC-16/X-25.
- 32 bits: CRC-32 (ISO-HDLC, used by Zip, gzip and PNG), CRC-32C (iSCSI, ext4, Btrfs), CRC-32/BZIP2, CRC-32/MPEG-2 and CRC-32/CKSUM, the POSIX
cksumCRC before its length is appended. - 64 bits: CRC-64/ECMA-182, CRC-64/XZ used by xz archives, and CRC-64/GO-ISO.
Text is checked as UTF-8 bytes without a trailing newline, so a value from echo on a terminal includes one extra byte.
Related tools
To see the bytes behind a string before you check it, use Text to Hex. For a cryptographic fingerprint rather than an error check, use the Hash Generator or go straight to the SHA-256 hash. To move binary data through text channels, see the Base64 Encoder. If you only need the common 32-bit checksums, the CRC-32 calculator opens with them selected.
Open-source credits
- The CRC engine is written for this site and follows the Rocksoft parameter model in Ross Williams' A Painless Guide to CRC Error Detection Algorithms (1993).
- Every preset's parameters and check value come from Greg Cook's Catalogue of parametrised CRC algorithms in the CRC RevEng project, and the tests assert each published check value.
- The tool uses no third-party library.
Frequently asked questions
Why does my CRC-32 differ from the one another tool shows?
Several different algorithms are all called CRC-32. Zip, PNG and Ethernet use CRC-32/ISO-HDLC, iSCSI and many file systems use CRC-32C, and bzip2, MPEG-2 and the POSIX cksum command each use their own variant. Compare the value against every 32-bit row on this page, and check that both tools hashed the same bytes, without a trailing newline.
Is a CRC a secure hash?
No. A CRC is designed to catch accidental changes such as line noise or a damaged sector, and it is very good at that. Anyone can change data and fix up the CRC on purpose in moments, so never use a CRC to prove that data was not tampered with. Use SHA-256 for that.
What does the check value of a CRC mean?
The check value is the CRC of the nine ASCII characters 123456789. The CRC RevEng catalogue publishes it for every model, so you can type 123456789 here and confirm that a preset, or your own custom parameters, give exactly the published value before relying on them.
How do I enter bytes rather than text?
Choose the Hex input format and paste the bytes as hexadecimal. Spaces, line breaks and 0x prefixes are ignored, so 31 32 33, 0x31 0x32 0x33 and 313233 are the same three bytes. The page tells you if a character is not a hex digit or the digits do not pair up into whole bytes.
Is my file uploaded to compute the CRC?
No. The file is read in your browser and every CRC is computed there by code on the page. Nothing is sent anywhere and nothing is kept once you close the tab. Files of up to 50 MB are accepted.