Prove a file is exactly what it claims to be.

A hash is a short fingerprint of some data. Change a single letter or byte and the fingerprint changes completely, which makes hashes ideal for checking that a download arrived intact or that two files are identical.

Type text or choose a file and all four SHA results appear at once. Add a key to get HMACs, or paste a checksum to compare.

Runs in your browser. Nothing is uploaded.

Results

More security tools · All 54 tools

How to use it

  1. Type or paste into Text to hash, or choose a file under Or hash a file.
  2. Read the SHA-1, SHA-256, SHA-384 and SHA-512 results. Each has its own Copy button.
  3. To sign a message instead, type a key into Secret key for HMAC. The results become HMAC values.
  4. Paste a checksum from a download page into Expected hash to compare. The tool says which result matches, if any.
  5. Tick Uppercase hex or Base64 output if the system you are matching expects that format.

Good to know

The algorithms

All four come from the Secure Hash Standard, FIPS 180-4, and run on your browser’s built-in Web Crypto engine.

AlgorithmBitsHex charactersUse today
SHA-116040Old checksums only
SHA-25625664The usual choice
SHA-38438496Some certificate and API systems
SHA-512512128Large-margin uses

There is no MD5 here. Web Crypto leaves it out because MD5 (RFC 1321) has been broken for years, and SHA-1 is in the same position: practical collisions exist, so neither should be trusted for security.

Check it yourself

The standard test text abc gives this SHA-256 value:

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Type abc and you should see exactly that. Add a line break after it and the result changes entirely, because the line break is part of the data. Text is hashed as UTF-8 bytes, so the same words typed on another system can differ if that system uses another encoding or line ending.

HMAC

An HMAC (RFC 2104) mixes a secret key into the hash:

HMAC(K, m) = H( (K ⊕ opad) ‖ H( (K ⊕ ipad) ‖ m ) )

H is the hash, K the key, m the message, and opad and ipad fixed padding bytes. Only someone with the key can produce the same value, which is how payment and webhook services sign their messages. The key is used as UTF-8 text, exactly as typed.

Not for storing passwords

SHA hashes are designed to be fast, which helps attackers try billions of guesses a second. NIST SP 800-63B asks services to store passwords with a salted, deliberately slow method such as Argon2id, scrypt, bcrypt or PBKDF2.

Limits

Files up to 200 MB are read whole into memory, so very large files may be slow on a phone. The comparison ignores spaces and letter case for hex values; Base64 is compared exactly, with or without its = padding.

Questions.

Which hash should I use to check a download?

Whichever the publisher lists, which is usually SHA-256. Paste their value into Expected hash and the tool tells you which result matches.

Why is there no MD5?

Browsers do not include MD5 in their crypto engine because it is broken for security. If a site still lists only an MD5 checksum, ask for a SHA-256 one.

Is my file uploaded?

No. The file is read and hashed by your browser on this page. It never leaves your device.

Why do I get a different hash from another tool?

Usually the input differs by something invisible: a trailing line break, a space, or Windows versus Unix line endings. The slightest change gives a completely different hash.

Can a hash be reversed to get the text back?

No. A hash cannot be turned back into its input. Short or common inputs can be guessed by trying many options, though, so a hash does not hide a weak password.

What is the HMAC key for?

It proves the message came from someone who knows the key. Services such as webhooks send an HMAC with each message so you can check it was not faked or changed.