Skip to content
Developer

Hash Generator

Compute a cryptographic digest of any text, or an HMAC with a shared secret. Uses the browser own WebCrypto implementation, so nothing is uploaded.

Press Esc to clear

Digests

Nothing to hash yet

Type or paste above and every digest appears here at once.

About the Hash Generator

A cryptographic hash turns any input into a fixed-length fingerprint. The same input always produces the same digest, a single changed character produces a completely different one, and the process cannot be run backwards. That combination makes hashes useful for checking that a file arrived intact, for comparing two things without storing either, and for signing.

MD5 is not offered here. It is thoroughly broken — producing two different inputs with the same MD5 digest takes seconds on a laptop — and WebCrypto refuses to implement it at all. SHA-1 is offered, because people genuinely need it to match systems built before its weaknesses were practical, but it is labelled as legacy-only for the same reason: it is broken for anything that depends on collisions being hard.

For anything new, SHA-256 is the right default. SHA-384 and SHA-512 produce longer digests and are not meaningfully more secure for typical use, though SHA-512 is faster than SHA-256 on 64-bit hardware.

HMAC is the other half of the tool, and a different job entirely. A plain hash of a message proves nothing about who produced it, because anyone can compute one. An HMAC mixes in a secret key, so only someone holding that key could have produced the value — which is how webhook signatures work, and how you check that a payload from a third-party service is genuine.

One thing hashes are not good for: passwords. A fast hash is exactly the wrong tool there, because fast means a brute-force attempt is fast too. Password storage needs a deliberately slow function like bcrypt, scrypt or Argon2. Everything here runs in your browser.

Frequently asked questions

Why is there no MD5 option?

Because it is broken, and because WebCrypto does not implement it. Producing two different inputs with the same MD5 digest is a matter of seconds on ordinary hardware.

Can I use this to hash passwords?

You should not. SHA-256 is fast, which is exactly wrong for passwords — it makes brute-forcing fast too. Use a deliberately slow function such as bcrypt, scrypt or Argon2.

What is HMAC for?

Proving who produced a message. A plain hash can be computed by anyone; an HMAC mixes in a secret key, so a matching value proves the sender held that key. It is how webhook signatures are verified.