To the Top

CRC32 Calculator (Javascript)

This page provides a Javascript implementation CRC32 (Cyclic Redundancy Checksum) calculator.

CRC32 (Cyclic Redundancy Checksum) is a fast and efficient algorithm to check the integrity of the data. It returns a 32-bit integer (signed or unsigned). It can be considered a weak type of Cryptographic hash functions (such as MD5). The cryptographic has functions normally has the following 4 goals:

  1. easy to implement and calculate the value for any given message
  2. not possible to generate a message that has a given hash
  3. not possible to modify a message without changing the hash
  4. not possible to find two different messages with the same hash.






The last goal is essentially the conflicts that two different source generating the same value. For CRC32, the implementation is quite easy. You define a CRC32 Table which consists of 256 elements (see the crc32.js), and just looping each element of the source text and do the computation like this:

r = (r >> 8) ^ CRCTable[str[i] ^ (r & 0x000000FF)];
where r stores the intermediate 32-bit integer value.

Javascript Download

Use the CRC32 function in your application easily; crc32.js

Link here!

Just paste the HTML code, shown below, onto the site of your choice.
    <a href="https://rot47.net/crc32.html" title="Online CRC32 Calculator (Cyclic Redundancy Check)">Online CRC32 Javascript Calculator</a>
Plain text example:
Online CRC32 Javascript Calculator

Share This


Page Edited: