adler32 hash generator online

Create the adler32 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.

Runs in your browser
A hash is one-way. It can't be turned back into the text.
Check & convert

Compare, hash a file, copy any format

Type text in the tool above or choose a file. Case, spaces and prefixes like adler32: don't matter.

Formats for hello world
Hex
1a0b045d
HEX (upper case)
1A0B045D
Base64
GgsEXQ==
Decimal (unsigned)
436929629
Decimal (signed 32-bit)
436929629

Files are read in your browser and never uploaded.

In short

What is Adler-32?

Adler-32 is a 32-bit checksum by Mark Adler, used in the zlib format (RFC 1950). It is faster to compute than CRC-32 but weaker, especially for short inputs. It detects accidental changes, not deliberate ones.

Not cryptographicBuilt for speed or error detection. Anyone can find inputs with a given hash.
Where you meet it
  • zlib streams
Try it

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.

Hash A…
Hash B…

Calculating…

Use it in code

The same result in your code

Every snippet prints 1a0b045d for hello world, the same as the tool. They are run against PHP's hash() before each release.

PHP
echo hash('adler32', 'hello world');
Python
import zlib

print(format(zlib.adler32("hello world".encode()), "08x"))
Java
import java.nio.charset.StandardCharsets;
import java.util.zip.Adler32;

public class Hash {
  public static void main(String[] args) throws Exception {
    var c = new Adler32();
    c.update("hello world".getBytes(StandardCharsets.UTF_8));
    System.out.printf("%08x%n", c.getValue());
  }
}
Go
package main

import (
	"fmt"
	"hash/adler32"
)

func main() {
	fmt.Printf("%08x\n", adler32.Checksum([]byte("hello world")))
}
Test values

Adler-32 test values

Hashes of common test strings (UTF-8, no line break). Use them to check your own implementation.

Inputadler32
empty string00000001
abc024d0127
hello world1a0b045d
The quick brown fox jumps over the lazy dog5bdc0fda
Common mistakes

Why your Adler-32 doesn't match

Weak on short inputs

For inputs under a few hundred bytes Adler-32 uses only part of its 32 bits, so accidental collisions are far more likely than with CRC-32.

Number or hex?

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.

A line break sneaks in

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.

Same text, different 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.

Upper or lower case

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:".

This tool trims and uses CRLF

Like the form on the original site, the tool removes spaces and line breaks at the start and end and sends line breaks as CRLF (\r\n). For exact bytes use "Hash a file" or "Exactly as typed" in the check panel.

Compare

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.

AlgorithmHashBits
adler321a0b045d32
crc327813f74432
crc32b0d4a118532
crc32cc99465aa32
Measured on your device

How fast is Adler-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.

FAQ

Questions about Adler-32

Is Adler-32 a secure hash?

No. Adler-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 Adler-32 hash?

A Adler-32 hash is always 32 bits, written as 8 hexadecimal characters (4 bytes), no matter how long the input is.

Good to know

Before you rely on it

Searches the list of pages on this site. What you type stays in your browser.