Hash generator

MD5, SHA-1, SHA-256, SHA-384 and SHA-512, with optional HMAC. Hashing happens entirely in this page — the text, the file and the key are never sent anywhere, and this tool makes no network requests after it loads.

Input empty

Text is hashed as UTF-8. Line endings count — a file saved with CRLF gives a different digest from the same text with LF.

Options
Mode
Digests plain digest
AlgorithmDigest
Nothing to hash yet.
Check against an expected hash not checked

Paste the checksum published alongside a download. It is matched against every algorithm above, so you do not need to know which one was used.

MD5 and SHA-1 are broken for security. Both have practical collision attacks, so neither should be used for signatures, certificates or password storage. They are still fine for spotting an accidentally corrupted file, which is why they are here. Use SHA-256 or stronger when the answer has to resist an attacker.
Hashing is not password storage. A plain digest of a password is guessable at billions of attempts a second. Passwords need a slow, salted function — bcrypt, scrypt or Argon2 — not any algorithm on this page.

About this tool

Type or paste text, or drop a file, and every digest is produced at once. Paste an expected checksum alongside and it is compared for you, so verifying a download does not come down to reading two long hex strings side by side.

HMAC digests take a key in hex, Base64 or plain text.

How it works

The SHA family and HMAC use the browser's built-in Web Crypto API. MD5 is not part of Web Crypto, so it is implemented in the page — it is included because checksums published alongside downloads are still often MD5, not because it should be used for anything security-related. Files are read locally and never uploaded, which is the whole point when the file is the thing you are checking.

Common questions

Is my file uploaded to check it?

No. The file is read by your browser and hashed on your machine. Nothing is sent anywhere, which is what makes this usable for a file you would not hand to a stranger.

Which should I use?

SHA-256 unless something else demands otherwise. MD5 and SHA-1 are both broken for security purposes — collisions can be constructed — and are here for checking downloads against published checksums, not for protecting anything.

What format does the HMAC key take?

Hex, Base64 or plain text. Invalid hex or Base64 is reported rather than quietly treated as text, so you find out before trusting the result.

Can I verify a checksum without comparing by eye?

Yes. Paste the expected value into the comparison field and it is matched against every digest produced, so a match is reported rather than left for you to spot.

When a checksum does not match

The download is complete but the hash is wrong

Check you are comparing like with like. The same digest can be written as lower-case hex, upper-case hex or Base64, and all three look like different values. This page produces all of them so the comparison can be made directly.

Hashing a text file gives a different result on two machines

Line endings again. CRLF and LF are different bytes, so they hash differently. Anything that has passed through a Git checkout with core.autocrlf enabled may have been rewritten.

The published checksum is for a different thing

Some projects publish the hash of an archive and others the hash of its contents after extraction. Some sign the checksum file itself rather than listing the file's hash. Check what is actually being described before concluding a download is corrupt.

HMAC output differs from your server's

Almost always the key encoding. A key stored as hex or Base64 must be decoded to bytes before use — hashing the characters of the encoded string gives a different result. This page takes hex, Base64 or plain text explicitly so the choice is visible rather than assumed.

An MD5 or SHA-1 match, and whether it means anything

For verifying an accidental corruption, a match is fine. For anything security-related it is not: both algorithms have practical collision attacks, meaning two different files can be constructed to share a digest. A matching MD5 does not prove a file is the one the publisher intended.

A very large file is slow or fails

The file is read in your browser, so it is bound by your machine's memory and speed rather than an upload. Multi-gigabyte files are better hashed at the command line.

The same job at the command line

For a large file or a scripted check these are the right tools. This page is for the times a browser is what you have.

More tools

See the whole toolbox — thirty-seven free tools planned, all running in your browser.