Like ToolFern? Prefer us as your source on Google →

Hash Generator (SHA)

Generate SHA-1, SHA-256, SHA-384, SHA-512 and MD5 hashes from typed text or a dropped file, the hex digest updates as you type. Add a secret key to compute an HMAC instead of a plain digest.

Verify a hash (compare two hashes)

The real reason to hash something is usually to check it against a value published somewhere else, for example a file's checksum on its download page. Paste both hashes below, letter case and extra spaces do not matter.

How to use it

Type or paste into the text box and the digests appear immediately.

Switch to the File tab to hash a file instead. Drop it in or click to browse.

For HMAC, turn it on and enter your shared key. The output changes completely, because HMAC is a different calculation rather than a hash of the key and message glued together.

MD5 and SHA-1 are broken, and still useful

Both are cryptographically dead. Neither should protect anything. Both are still perfectly good for something.

What broke is collision resistance. A collision means two different inputs giving the same digest. For MD5 that has been practical since 2004. SHA-1 fell in 2017, when Google and CWI Amsterdam produced 2 different PDFs sharing one SHA-1 digest, in an attack they called SHAttered.

That matters hugely for signatures and certificates. An attacker who can build a collision swaps a harmless document for a malicious one and the signature still checks out.

It matters not at all for verifying a download.

If a publisher lists an MD5 and your file matches, the file arrived intact. Random corruption landing on a matching digest is not a realistic event. The threat here is a flaky network, not an adversary crafting a collision aimed at your particular download.

MD5 stays on this page for exactly one reason. Plenty of projects still publish MD5 checksums, so you need something to check them against.

Never hash a password with these

Any of them. Including SHA-512.

The trouble is speed. These are fast, and fast is the enemy here.

A modern GPU rig runs billions of SHA-256 hashes a second. Hand an attacker a stolen hash list and they chew through every common password in very little time. How strong the algorithm is hardly matters when the attack is just guessing.

Password storage wants a slow function built to resist that. bcrypt, scrypt and Argon2 all let you tune the work per attempt, so you can set them to a few hundred milliseconds. Nobody notices that when they log in. It wrecks an attacker trying billions of guesses.

They also salt on their own, which stops 1 precomputed table cracking every account at once.

What HMAC actually solves

A plain hash proves a message has not changed. Anyone can recompute one over modified data, so it says nothing about who sent it.

HMAC fixes that by mixing a secret key into the calculation. Only someone holding the key can produce a valid digest, so a matching HMAC tells you the message is intact and that it came from someone who knew the secret.

This is what webhook signatures use. Stripe, GitHub and most other providers sign their payloads with HMAC so you can confirm a request genuinely came from them rather than from anyone who guessed your endpoint URL.

The reason HMAC exists as its own construction, rather than people just hashing the key and message together, is that the naive version is vulnerable to length-extension attacks against MD5 and SHA-1. HMAC nested structure closes that hole.

Frequently asked questions

Which algorithm should I use?

SHA-256 for anything new. It is the current default and there is no practical attack on it.

Why is MD5 still here if it is broken?

Because many projects still publish MD5 checksums for their downloads, and verifying a file against one is a legitimate use. Broken collision resistance does not affect that.

Can I hash a file instead of text?

Yes. Switch to the File tab and drop one in.

Is this safe for storing passwords?

No, and neither is SHA-512. These functions are fast, which is exactly wrong for passwords. Use bcrypt, scrypt or Argon2, which are deliberately slow and salt automatically.

What is HMAC for?

Proving who sent a message. It mixes a secret key into the hash, so only someone holding that key can produce a valid result. Webhook signatures work this way.

Does the same input always give the same hash?

Always. That is the defining property, and it is why a matching digest confirms a file downloaded intact.

Related: check a password · Base64 encode and decode · generate UUIDs · decode a JWT

Found this useful? Share it