crc32b hash generator online
Create the crc32b hash of any text: 8 hex characters, the same result as PHP's hash(). Check a hash or a file below. Nothing leaves your browser.
Compare, hash a file, copy any format
Type text in the tool above or choose a file. Case, spaces and prefixes like crc32b: don't matter.
hello world- Hex
0d4a1185- HEX (upper case)
0D4A1185- Base64
DUoRhQ==- Decimal (unsigned)
222957957- Decimal (signed 32-bit)
222957957
Files are read in your browser and never uploaded.
What is CRC-32?
CRC-32 is a 32-bit checksum that detects accidental changes, such as transmission errors. It is the CRC used in ZIP, gzip, PNG and Ethernet, and the same value PHP's crc32() function returns as a number. It is not a security function: anyone can change data and keep the same CRC.
- ZIP, gzip and PNG
- Ethernet frames
- Quick change detection
Change one letter, see what happens
A good hash changes about half of all bits when one input character changes. Checksums and fast hashes often change fewer, which is fine for them, but it shows why they are no security tool.
……Calculating…
The same result in your code
Every snippet prints 0d4a1185 for hello world, the same as the tool. They are run against PHP's hash() before each release.
echo hash('crc32b', 'hello world');
import zlib print(format(zlib.crc32("hello world".encode()), "08x"))
import { crc32 } from "node:zlib"; // Node 22.2+ console.log(crc32("hello world").toString(16).padStart(8, "0"));
import java.nio.charset.StandardCharsets; import java.util.zip.CRC32; public class Hash { public static void main(String[] args) throws Exception { var c = new CRC32(); c.update("hello world".getBytes(StandardCharsets.UTF_8)); System.out.printf("%08x%n", c.getValue()); } }
package main import ( "fmt" "hash/crc32" ) func main() { fmt.Printf("%08x\n", crc32.ChecksumIEEE([]byte("hello world"))) }
CRC-32 test values
Hashes of common test strings (UTF-8, no line break). Use them to check your own implementation.
| Input | crc32b |
|---|---|
| empty string | 00000000 |
abc | 352441c2 |
hello world | 0d4a1185 |
The quick brown fox jumps over the lazy dog | 414fa339 |
Why your CRC-32 doesn't match
PHP's hash("crc32") is the BZIP2 variant, hash("crc32b") is the common CRC-32 (ZIP, PNG, zlib), and hash("crc32c") the Castagnoli variant. PHP's crc32() function returns the crc32b value as a number.
crc32() in PHP, zlib.crc32 in Python and java.util.zip.CRC32 return a number; hash("crc32b") returns 8 hex characters. 222957957 and 0d4a1185 are the same checksum. The check panel shows both.
In Java (int), C# (int) and older 32-bit PHP, a CRC above 2,147,483,647 shows up negative. Add 4,294,967,296 or use an unsigned type.
echo "hello world" | sha256sum hashes 12 bytes: the text plus a line break. Use printf '%s' 'hello world' or echo -n to hash exactly 11 bytes.
The tool hashes UTF-8 bytes, like most languages. Windows APIs and .NET's Encoding.Unicode use UTF-16, older systems Latin-1. "ü" is 2 bytes in UTF-8, 1 in Latin-1, 2 in UTF-16, and each gives a different hash.
Hex is not case-sensitive: 5EB63BBB… and 5eb63bbb… are the same hash. Compare in one case, and watch for spaces or a prefix like "sha256:".
The Checksums family side by side
The same text, every Checksums algorithm. Shown for hello world; type in the tool above to use your text.
How fast is CRC-32?
Hashes up to 4 MB of random data in your browser and compares with sha256, md5. Browser numbers are lower than native code, but the ranking holds.
Questions about CRC-32
Is CRC-32 a secure hash?
No. CRC-32 is built for speed or error detection, not security: anyone can find or construct inputs with a given value. Use SHA-256 when someone might tamper with the data.
How long is a CRC-32 hash?
A CRC-32 hash is always 32 bits, written as 8 hexadecimal characters (4 bytes), no matter how long the input is.
What is the difference between crc32 and crc32b?
In PHP, crc32b is the common CRC-32 (ZIP, PNG, zlib, PHP's crc32() function). crc32 is the BZIP2 variant with reversed bit order and gives a different value.