Hash Generator

Generate SHA-256 and SHA-512 hashes from text input using the Web Crypto API.

Crypto Β· SHA-256 Β· SHA-512

Generate SHA-256 and SHA-512 digests from text using the Web Crypto API β€” entirely in your browser. Useful for integrity checks, demos, and content fingerprints, with clear guidance on what hashing is not for.

SHA-256 & SHA-512 Web Crypto API Client-side digests Copy hex output No server round-trip

What a cryptographic hash is

A cryptographic hash function maps arbitrary input to a fixed-size digest. Small changes in the input produce completely different outputs (avalanche effect). Good hash functions are designed to be one-way: you should not recover the original message from the digest alone.

SHA-256 (32-byte digest) and SHA-512 (64-byte digest) are widely deployed in TLS, software signing pipelines, Git (content addressing relatives), and checksum files. This tool exposes both via crypto.subtle.digest in supporting browsers.

Passwords: Do not store passwords as raw SHA-256(password). Use a password hashing KDF β€” Argon2, bcrypt, or scrypt β€” with a unique salt, on the server. Fast hashes are the wrong tool for password storage.

How to use it

  1. Enter or paste the text to hash.
  2. Generate digests β€” SHA-256 and SHA-512 appear in the output panels.
  3. Copy a hex digest and compare it to a published checksum or another system’s output.
  4. Remember encoding: hashing the string abc as UTF-8 is standard here; hashing binary file bytes may differ if tools assume another encoding.

When hashing helps

Hash vs encryption vs encoding

OperationReversible?Purpose
Hash (SHA-256)No (by design)Integrity, fingerprints
Encryption (AES, …)Yes with keyConfidentiality
Encoding (Base64)Yes, no secretSafe transport of bytes as text

Example

Input:  hello
SHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

(Verify with another trusted implementation if you use digests in a security decision β€” and always hash the exact same bytes.)

FAQ

Is hashing the same as encryption?

No. Hashes are one-way digests. Encryption is designed to be reversed with the correct key.

Why doesn’t my hash match another website?

Different algorithms, hex vs base64 output, added newlines, or UTF-8 vs UTF-16 encoding. Compare algorithm and exact input bytes.

Does text leave my browser?

Hashing uses Web Crypto locally. Privacy Policy.

MD5 / SHA-1?

This tool focuses on SHA-256/512. MD5 and SHA-1 are deprecated for security-sensitive integrity in most modern threat models.

Related tools

Sponsored