SHA-256 Hash Generator · CryptoHash Studio

Generate SHA-256, SHA-384 and SHA-512 hashes from text or files. Nothing ever leaves your browser.

Updated:

100% client-side

Input

0 characters

Hashes

SHA-256
—
SHA-384
—
SHA-512
—

See the avalanche effect live

Edit box B by a single character and watch how much of the SHA-256 output flips — that's the avalanche effect NIST FIPS 180-4 relies on for collision resistance.

What the SHA-256 hash generator does

A cryptographic hash is a fixed-length string of characters (a "fingerprint") generated from any text or file — the same input always produces the same hash, but even a tiny change produces a completely different one. CryptoHash Studio generates SHA-256, SHA-384 and SHA-512 hashes from text or files, which developers use to verify a download wasn't corrupted, check that a password matches without storing the password itself, or confirm two files are byte-for-byte identical.

How to use the SHA-256 hash generator

  1. Choose Text or File mode at the top of the Input panel.
  2. Type or paste your text into the box, or click the drop zone to choose a file.
  3. Read the SHA-256, SHA-384 and SHA-512 hashes as they appear instantly in the Hashes panel.
  4. Click the copy icon next to any hash to copy it to your clipboard.
  5. Optionally, use the avalanche effect section below to see how changing one character completely changes the hash.

How hashing works

A cryptographic hash function takes input of any size and produces a fixed-size "digest" — 256, 384 or 512 bits for the SHA-2 family. The same input always produces the same digest, but even a one-character change produces a completely different one:

SHA-256("abc")  = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
SHA-256("abd")  = a52d159f262b2c6ddb724a61840befc36eb30c88877a4030b65cbe86298449c9

This tool uses the browser's native crypto.subtle.digest() — part of the W3C Web Cryptography API — so hashing happens with the same audited implementation your browser uses for TLS, not a JavaScript reimplementation.

Examples

1. Why your checksum doesn't match the terminal's. The same word gives two different SHA-256 values depending on whether a trailing newline comes with it. A file saved by most editors (and the output of echo) ends in \n; text typed into the box does not. We got the same two values from printf 'hello' | sha256sum and echo hello | sha256sum:

Text mode   "hello"           5 characters
SHA-256     2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

File mode   hello.txt (6 B)   "hello" + newline
SHA-256     5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03

2. Spotting a one-cent change in a record. Storing a digest next to a record lets you detect later edits. Changing a single digit flips more than half of the 256 output bits, so the two hashes share nothing recognizable (values checked against Node's crypto.createHash('sha256')):

Text A  invoice-total=100.00
SHA-256 2d19819399a6bd90c4bbd4b52ab621cd035c47fa171d538aa3f1d9f27b9943b2
Text B  invoice-total=100.01
SHA-256 e4be668fa86cc3198dfcdf06bf6b74f6dc87c5e9afe217067f0e99cea603fb30

137 of 256 bits flipped (53.5%) — the ideal is close to 50%.

A plain hash only catches accidental changes, because anyone who edits the record can also recompute the hash. To make tampering detectable, sign the record with a secret key in the HMAC generator. For storing passwords, use a slow, salted hash such as bcrypt or Argon2id from the bcrypt & Argon2 hash generator, not SHA-256.

Reference: NIST FIPS 180-4 (Secure Hash Standard).

Frequently asked questions

Is it safe to hash sensitive data here?

Yes. Hashing runs entirely in your browser using the native Web Cryptography API (crypto.subtle); no text or file is ever uploaded to a server.

What's the difference between SHA-256, SHA-384 and SHA-512?

They're all part of the SHA-2 family defined in NIST FIPS 180-4, differing mainly in digest size (256, 384 and 512 bits) and internal word size. Longer digests give a larger security margin against brute-force and collision attacks, at a small computational cost.

What is the avalanche effect and why does it matter?

It's the property that changing a single bit of input flips roughly half the output hash's bits. It means near-identical inputs produce completely unrelated-looking hashes, which is essential for detecting tampering and for resisting attacks that try to predict a hash from a similar known one.

Can I hash a file instead of text?

Yes. Select or drop a file and it's read locally with the FileReader API and hashed the same way as text — the file itself is never uploaded anywhere.