Hash and Checksum Calculator — MD5, SHA-1, SHA-256, SHA-384, SHA-512, CRC32 and Adler32 for text or a file

Type text or pick a file and get every digest at once: MD5, SHA-1, SHA-256, SHA-384 and SHA-512 from the browser's own crypto, plus hand-written CRC32 and Adler32. Paste a published checksum and the line that matches is named. Nothing you type or open leaves this device.

AlgorithmDigestBitsMatch
What each of these is

What each of these algorithms is

Algorithm Digest Made for
MD5 128 bit / 32 hex Legacy fingerprints. Collisions are cheap, so never for security.
SHA-1 160 bit / 40 hex Old git objects and legacy signatures. Broken by chosen-prefix collisions.
SHA-256 / SHA-384 / SHA-512 256 / 384 / 512 bit SHA-2. The default choice today; this is what software downloads publish.
CRC32 32 bit Detecting accidental damage: zip, gzip, PNG, Ethernet.
Adler32 32 bit The same job, faster to compute, and better than CRC32 on short data.
HMAC-SHA1 / HMAC-SHA256 160 / 256 bit A keyed code: proves the sender holds the secret. Not a hash of the message alone.

The SHA rows and the HMAC rows come from crypto.subtle, the browser’s own implementation — the same primitive that TLS and fetch use. MD5, CRC32 and Adler32 are written out in the script itself, because a browser has no MD5, and CRC32 in JavaScript is thirty lines of table lookup.

It hashes bytes, not text

Every one of these algorithms eats a byte string. When you hash the word 你好 you are hashing its UTF-8 bytes, and the same characters encoded as GBK hash to something else. So do the whole file: a text file downloaded as UTF-8 with a trailing newline does not match the checksum published for the same file without it, Windows writes \r\n where the release server kept \n, and a “fixed” copy that lost a byte at the end hashes completely differently. The stats box counts the bytes actually hashed, so the mismatch becomes visible instead of mysterious.

Matching a published checksum

Paste the digest you were given into the fourth field. Spaces, colons, dashes and a SHA256= or SHA256 (file) = label are stripped before comparing, and the case does not matter. The Match column then says which algorithm produced it — a useful answer in itself, since a 32-character value people call “the md5” could also be an MD5 of different bytes. If nothing matches, the note tells you how long your value was, which is usually enough to work out what went wrong: wrong length means a different algorithm, right length with no match means different bytes.

CRC32 is not a hash

A checksum answers “did the bytes change by accident”. A cryptographic hash answers “could someone choose bytes that give this same digest”. CRC32 is linear: append a four-byte block computed from the difference you want and the checksum comes back identical, which is why zip entries can be edited without touching the CRC column. Adler32 is two plain sums modulo 65521, so it is weaker still on structured data. Both are exactly right for detecting a truncated download, and exactly wrong for proving nobody tampered with a file.

MD5 and SHA-1 are broken, in a specific way

“Broken” here means collisions: two different inputs with the same digest can be manufactured. For MD5 that takes a laptop minutes; for SHA-1 it took a cloud team in 2020 (the SHAttered pair), and later a chosen-prefix collision usable to forge a certificate. Preimages are still out of reach for both, so an MD5 used as a cache key is fine while an MD5 used to sign a binary is not. SHA-256 has no published attack at all — its security margin is the reason every checksum line on a download page today reads sha256sum.

HMAC: why the key row is separate

HMAC-SHA256(message, key) is not sha256(key + message), and that difference is the whole design. Concatenating lets length-extension tricks run the hash forward from a published digest without knowing the key. HMAC hashes the key-masked block twice, so the code cannot be extended or forged by anyone missing the secret. Web hooks, payment signatures and JWTs all use this construction — put the shared secret in the key field and the last two rows appear.

Questions

Why do the SHA rows say they are unavailable? crypto.subtle only exists on a secure context (https://, or file:// opened locally in most browsers). Opened over a plain http:// address from another machine, the browser withholds it. MD5, CRC32 and Adler32 keep working, since the script computes them itself.

How big a file can I hash? Up to 256 MB, because the browser has to load it into memory whole. Anything larger, use the command line — the digests will be identical, and the note above tells you which command.

Does my file or text get uploaded? No. There is no fetch, no XMLHttpRequest and no analytics request carrying input in this script: hashing happens in local JS against bytes read from your disk, and what you type or open never leaves this device.

Support on PayPal