Hash Generator (SHA)

A cryptographic hash compresses text of any length into a fixed-size fingerprint with a useful property: change a single character and the fingerprint changes beyond recognition. That is why digests verify downloads, fingerprint content and key caches. This tool computes SHA-1, SHA-256 and SHA-512 with the Web Crypto API built into your browser.

hash-generator runs 100% locally
Uses the Web Crypto API (crypto.subtle) built into your browser.

How to use it

  1. Type or paste the text to hash.
  2. Select an algorithm — SHA-256 is the sensible default for nearly everything.
  3. Press Generate and copy the hex digest.

Key facts

About this tool

A cryptographic hash compresses text of any length into a fixed-size fingerprint with a useful property: change a single character and the fingerprint changes beyond recognition. That is why digests verify downloads, fingerprint content and key caches. This tool computes SHA-1, SHA-256 and SHA-512 with the Web Crypto API built into your browser.

Because your browser's own crypto engine does the maths, the digests are exactly what any standard command-line tool would produce — with the difference that the text being hashed never leaves your device, so internal strings and test data stay put.

Like every TextKit tool, the Hash Generator (SHA) runs entirely on your device. There is no account, no upload and no record of the content you process — close the tab and everything is gone.

Frequently asked questions

Which algorithm should I pick?

SHA-256 for almost everything: file checksums, fingerprints, integrity checks. SHA-512 when a system asks for it. SHA-1 only to match a digest an older system published.

Can I recover the original text from a hash?

No. A hash is a one-way fingerprint, not an encryption. Short or predictable inputs can be guessed and re-hashed, though — which is why a hash alone should never be treated as secrecy for weak inputs.

Why is MD5 not offered?

The Web Crypto API built into browsers deliberately excludes MD5, so there is no native, trustworthy way to offer it here. Modern browsers simply refuse to compute it.

Why does the digest look random when I change one letter?

That is the avalanche effect, and it is the point: digests are designed so that any change to the input scrambles roughly half the output bits, making similar inputs impossible to spot from their hashes.

Related tools

~/tool/base64-encode-decode

Base64 Encode / Decode

Encode text to Base64 or decode it back, with full Unicode support.

~/tool/url-encode-decode

URL Encode / Decode

Percent-encode text for URLs, or decode percent-encoded strings back.

~/tool/json-formatter

JSON Formatter & Validator

Pretty-print, minify and validate JSON, with the exact error location when it breaks.