Free · No sign-up · Runs in your browser

SHA Hash Generator

Generate a cryptographic hash of any text using SubtleCrypto, the browser's native cryptography API. Hashing is one-way: the same input always produces the same digest, and the digest cannot be reversed.

Input
Output
0 chars

What a hash is for

A hash function turns input of any size into a fixed-length fingerprint. The same input always produces the same output, but changing a single character produces a completely different result, and there is no way to work backwards from the digest to the input. That makes hashes useful for verifying that a file downloaded intact, detecting whether data has changed, and comparing values without storing the originals.

Which algorithm to use

  • SHA-256 — the sensible default. Widely supported, no known practical weaknesses, 64 hex characters.
  • SHA-512 — larger digest, and actually faster than SHA-256 on 64-bit hardware. Use when you want extra margin.
  • SHA-384 — a truncated SHA-512, used in some TLS configurations.
  • SHA-1broken. Practical collisions were demonstrated in 2017. Provided only for verifying legacy checksums and git object IDs; never use it for new security work.
  • MD5 — also broken, and available separately for the same legacy reasons.

Never hash passwords with SHA-256

This is the most consequential misuse of these functions. SHA-256 is designed to be fast, which is exactly wrong for passwords — a modern GPU computes billions of SHA-256 hashes per second, so a stolen database of SHA-256 password hashes falls quickly to brute force. Password storage requires a deliberately slow, salted algorithm: bcrypt, scrypt, or Argon2. Use SHA-256 for integrity checking, not for credentials.

Verifying a download

When a project publishes a SHA-256 checksum next to a download, hashing the file you received and comparing the two confirms it arrived intact and unmodified. This tool hashes text rather than files, so it is suited to verifying strings, API payloads, and configuration values. For file checksums use your operating system: shasum -a 256 file on macOS and Linux, or Get-FileHash file in PowerShell.


Frequently asked questions