Skip to main content

SHA Hash Generator

Generate cryptographic hashes of any text in your browser — SHA-256, SHA-512, or SHA-1 — using the built-in Web Crypto API. No data leaves your machine, and the same input always produces the same digest.

How it works

A hash function maps input of any length to a fixed-size digest: 256 bits for SHA-256, 512 for SHA-512, 160 for SHA-1. The output is deterministic (same input, same digest), one-way (cannot be reversed), and avalanche-sensitive (one changed character changes roughly half the output bits).

The computation runs on crypto.subtle, the browser’s hardware-backed cryptographic engine — no third-party library is involved.

Choosing an algorithm

AlgorithmDigest sizeStatus in 2026Use
SHA-256256 bitStandardDefault choice: checksums, fingerprints, signatures, TLS, Git
SHA-512512 bitStandardHigh-assurance contexts; faster than SHA-256 on 64-bit CPUs
SHA-1160 bitDeprecated for securityLegacy compatibility only — do not use for new systems

For passwords specifically, none of these are suitable: use a slow, salted function like Argon2 or bcrypt instead. Hashes are for integrity, not for storing secrets.

Common uses

  • File integrity: verify downloads with a checksum published by the vendor
  • Content fingerprinting: detect duplicate documents and cache entries
  • Git and blockchain: SHA-256 (Git uses SHA-1/SHA-256 variants) underpins commit IDs and blocks
  • API signing: HMAC-SHA256 is the standard for request signatures and webhooks

Pair it with the Base64 encoder when a digest must travel inside a JSON payload, or the JWT decoder to inspect the signature algorithm of a token.

For the full guide to hashing — including when not to use SHA-256 — read SHA-256 Explained.