How to generate a SHA-256 hash (and HMAC) of any text

A hash is a fixed-length fingerprint of data. Change one character and the hash changes completely. Hash generator computes them locally with your browser’s Web Crypto.

Steps

  1. Paste your text.
  2. Choose the Algorithm (SHA-256 by default) and Output (hex or Base64).
  3. Optionally add a Secret key to produce an HMAC.
  4. Tick Hash each line separately to get one hash per line.
  5. Copy the result.

What each algorithm is for

  • SHA-256: the sensible default for checksums and integrity.
  • SHA-384, SHA-512: longer fingerprints; fine when a system requires them.
  • SHA-1: broken for security; use only for legacy compatibility.

What is an HMAC?

An HMAC mixes a secret key into the hash. It proves that a message came from someone who knows the key and was not changed. Webhook signatures often use HMAC-SHA-256. Compare results exactly; the UPPERCASE hex option only changes capital letters, not the value.

What hashing is not

  • It is not encryption: you cannot get the text back.
  • A plain SHA-256 is not a safe way to store passwords. Use a slow password hashing function such as bcrypt, scrypt or Argon2 on a server.

Tip

To make a strong password rather than hash one, use Password generator.

All guides

↑ ↓ navigateEnter openEsc close