SHA-256 Hash Generator
Generate a SHA-256 hash of any text — a 64-character hex fingerprint, computed right in your browser.
SHA-256 turns any text into a fixed 256-bit fingerprint written as 64 hexadecimal characters. Hashing the word “hello” always gives 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. The same input always yields the same digest, but the process is one-way — you cannot turn the hash back into the original text.
What SHA-256 is
SHA-256 is a cryptographic hash function from the SHA-2 family, published by NIST. It reads any amount of input — a single word or a whole file — and produces a fixed 256-bit output called a digest, usually shown as 64 hexadecimal characters. The mapping is deterministic, so identical input always produces an identical digest, yet it is designed to be one-way: given a digest, there is no practical way to recover the input or to find two different inputs that share it.
Length is always fixed, no matter how long the input is.
Why the length never changes
A hash is a fingerprint, not a container. Whether you hash one character or a gigabyte, SHA-256 compresses everything down to exactly 256 bits. Each bit can be 0 or 1, and four bits form one hexadecimal digit (0–f), so 256 ÷ 4 = 64 hex characters. Change a single letter of the input and roughly half the output bits flip — this avalanche effect is what makes a hash useful for spotting tampering.
- 1 Keep the algorithm on SHA-256. SHA-256 is selected by default; switch to SHA-1 or SHA-512 only if you need a different digest size.
- 2 Type or paste your text. Enter hello. The tool encodes it as the UTF-8 bytes 68 65 6c 6c 6f.
- 3 Let the browser compute it. The hash is calculated with the built-in SubtleCrypto API as you type, so no data is sent anywhere.
- 4 Read the 64-character digest. hello produces 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.
- 5 Copy and compare. Use Copy, then match the digest against a published checksum to confirm two files or strings are identical.
Common hash digest sizes
More bits mean a larger output and a bigger search space for collisions.
| Algorithm | Digest size | Hex characters |
|---|---|---|
| SHA-1 | 160-bit | 40 |
| SHA-256 | 256-bit | 64 |
| SHA-512 | 512-bit | 128 |
Hashing is not encryption
Encryption is two-way: with the right key you can decrypt the ciphertext back to the original. Hashing is one-way by design — there is no key and no “un-hash” operation, so a digest cannot be reversed to reveal the input. Because the same input always maps to the same digest, hashes are ideal for integrity checks and checksums: recompute the hash of a downloaded file and compare it to the published one to prove nothing changed in transit. Note that SHA-1 is now deprecated for security use — practical collisions have been demonstrated — so prefer SHA-256 or SHA-512 for anything where tamper resistance matters.