Developer & Tech

SHA Hash Generator

What this does

Compute SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text at once using the browser’s native WebCrypto engine.

Enter your details

Runs in your browser

Calculator inputs

Using the sha hash generator

  1. 01

    Paste your text

    Config values, license keys, integrity-check payloads; anything textual.

  2. 02

    Pick the primary digest

    The chosen algorithm headlines; all four compute regardless for comparison.

  3. 03

    Copy the hex string

    Lowercase hex; the conventional representation everywhere.

Choosing among the SHAs

SHA-256 is the modern default for signatures, integrity checks and blockchains. SHA-384/512 offer larger margins (and SHA-512 often runs faster on 64-bit CPUs). SHA-1 survives only in legacy systems; practical collision attacks have existed since 2017, so never accept it for new security designs.

Hashes verify, they do not encrypt

  • Same input → same digest, deterministically
  • Tiny change → avalanche: roughly half the output bits flip
  • Cannot reverse a digest; verification works by recomputing
  • For passwords use dedicated KDFs (bcrypt, argon2), never bare SHA

The math behind this calculator

digest = SHA-x(UTF-8(text)) rendered as 160/256/384/512-bit lowercase hex

Your text converts to UTF-8 bytes and passes through the built-in WebCrypto digest function for each algorithm simultaneously. All four hex digests appear together so you can copy whichever your protocol needs and cross-check consistency at a glance.

Empty input is legitimate: hashing the empty string yields the well-known published digest, so the tool shows a result immediately rather than demanding text first.

Assumptions & limitations

  • Input treated as UTF-8 text; binary files need a different tool.
  • Digests are one-way; there is no decrypting a hash.
  • SHA-1 is provided for legacy checksums only, not security.

Worked example

The famous test vector abc hashes under SHA-256 to ba7816bf…f20015ad; matching the FIPS 180 reference exactly, byte for byte.

Frequently asked questions

Why do all four digests show at once?
They cost almost nothing to compute together, and side-by-side output catches copy-paste mistakes between algorithms instantly.
Can I hash a file here?
This tool accepts text only. For binaries use your OS: shasum -a 256 file (macOS/Linux) or Get-FileHash (Windows).
Is hashing a password with SHA-256 acceptable?
No; it is far too fast for attackers. Use bcrypt, scrypt or argon2 with salt; those are deliberately slow key-derivation functions.
Where is computation performed?
In-browser via the native WebCrypto API; your text never leaves the page.

Related calculators