DevToolBayFree Developer Tools

SHA-256 for Developers: Checksums, HMAC and What Hashing Cannot Do

When to use SHA-256 (and when not to), how HMAC adds a secret, why password hashing needs bcrypt or Argon2 instead, and how to verify checksums quickly.

SHA-256 is the fingerprint function of the internet — embedded in TLS certificates, package managers and blockchains. Yet it is also the most misused primitive in application code. This guide draws the usable line.

What SHA-256 is good for

  • Integrity: compare a download hash with the published one — same fingerprint, same bytes.
  • Cache and dedup keys: arbitrary content maps to a stable 64-character hex identifier.
  • Signature inputs: JWT HS256 and RSA/ECDSA signatures all hash with SHA-2 underneath.

Generate any digest offline with the SHA-256 Hash Generator — nothing you paste leaves the browser, which matters when hashing URLs or internal identifiers.

What hashing cannot do

A hash is one-way and unkeyed. It provides no confidentiality (anyone sees it) and no authentication (anyone can compute it). Encrypting something is a different operation with a key; hashing it merely fingerprints it.

HMAC: hashing with a secret

HMAC wraps SHA-256 with a key: only holders of the secret can produce a matching tag. That is what turns a plain digest into a verifiable signature — the mechanism behind JWT HS256 and most API request signing. Decode a JWT and inspect its signature claims with the JWT Decoder.

Passwords: do not use SHA-256 directly

Fast hashes are build for speed — exactly what attackers exploit with GPU cracking. Password hashing needs deliberately slow, salted KDFs: bcrypt, scrypt or Argon2. Generate strong random passwords instead of hashing weak ones, using the Password Generator.

Quick checksum workflow

After downloading a binary, generate its SHA-256 locally and compare character by character with the vendor value — the hash tool does it in one paste, including large inputs.

Related guides

Try these tools