SHA Hash Generator
This SHA hash generator computes SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text in your browser with the Web Crypto API - nothing is uploaded, and MD5 is deliberately not offered.
Computed in your browser with the Web Crypto API. MD5 is deliberately not offered - it is broken for any security purpose.
About SHA Hash Generator
Type or paste text and all four digests appear at once, recomputed as you edit, each with a copy button. There is no submit button and no request: the hashing happens in the page. That is the whole reason to use a local tool for this particular job, because the input is often something you would rather not hand to a stranger - an API secret you are checksumming, a configuration blob, a value you are comparing against a digest someone else recorded.
SHA-1 and the SHA-2 family are specified in FIPS 180-4, and what separates them in practice is collision resistance, the difficulty of finding two different inputs with the same digest. MD5 lost that property long ago: collisions have been cheap since 2004, and a chosen-prefix collision was used in the wild to forge a code-signing certificate. SHA-1 fell in 2017 when a practical collision was demonstrated, with chosen-prefix collisions following in 2020. Any signature, manifest or certificate that trusts a broken hash can be swapped for a different file that hashes identically.
Digests come from crypto.subtle.digest, the browser's own implementation, so the arithmetic is the same audited code your TLS stack uses and no JavaScript hash library is shipped to you. MD5 is absent partly because the Web Crypto API does not implement it and partly because offering it would invite exactly the wrong use. SHA-1 is present for legacy interoperability only - reading a certificate fingerprint, matching a git object id, checking an old checksum - and should never be chosen for new security work, where SHA-256 is the sensible default.
How to use it
- 1Type or paste the text you want to hash into the Text to hash field.
- 2Watch the four digests recompute as you type; there is nothing to submit and nothing to wait for.
- 3Copy the digest you need with the button beside it - output is lowercase hexadecimal.
- 4Choose SHA-256 unless something external forces your hand, and SHA-384 or SHA-512 where a protocol specifies a longer digest.
- 5Treat any SHA-1 value as an identifier for legacy systems, not as a security guarantee.
Common use cases
- -Confirming two configuration snippets are byte-identical by comparing their SHA-256 digests instead of reading them line by line.
- -Reproducing the SHA-256 digest an API expects while debugging a request-signing or webhook-validation step.
- -Generating a stable digest of a text identifier for use as a cache key or a deduplication token.
- -Checking a legacy SHA-1 value produced by an older system while migrating that system to SHA-256.
- -Hashing sensitive text such as a shared secret without sending it to a remote service.
Frequently asked questions
- Is MD5 still safe to use?
- Not for anything security-related. Practical collisions have existed since 2004, and a chosen-prefix collision was used in the wild to forge a code-signing certificate. MD5 survives only as a non-adversarial checksum against accidental corruption, and even there SHA-256 costs no more. This generator does not offer MD5, partly because the Web Crypto API does not implement it and partly to avoid encouraging it.
- Should I still use SHA-1?
- Only to interoperate with something that already requires it: an existing certificate fingerprint, a git object id, a legacy checksum you have to match. A practical SHA-1 collision was demonstrated in 2017 and chosen-prefix collisions followed in 2020, so it must not back a new signature, integrity check or deduplication scheme. Use SHA-256 or SHA-512 for anything new.
- What is the difference between SHA-256 and SHA-512?
- Both belong to the SHA-2 family in FIPS 180-4. SHA-256 operates on 32-bit words and produces a 256-bit digest; SHA-512 operates on 64-bit words and produces 512 bits, and is often faster on 64-bit hardware despite the longer output. SHA-384 is a truncated SHA-512. SHA-256 is sufficient for most purposes; pick SHA-384 or SHA-512 when a protocol or policy names them.
- Can a SHA-256 hash be reversed?
- No. A hash is one-way, and the digest is a fixed length regardless of input size, so there is nothing to invert. What is possible is guessing: short or common inputs can be brute-forced or looked up in precomputed tables. That is why passwords must be stored with a salted, deliberately slow function such as bcrypt or Argon2 rather than a bare SHA digest.