SHA-256 hash generator

Get the SHA-256 digest of text or a file instantly. The empty string hashes to e3b0c442…b855; any change to the input changes the whole 64-character result.

Runs entirely in your browser. Nothing you paste is uploaded.

About SHA-256

SHA-256 is part of the SHA-2 family published by NIST in FIPS 180-4. It is used in TLS certificates, Git (newer object format), Bitcoin, code signing and Subresource Integrity. No practical collision attack is known.

How it works here

SHA-1 and the SHA-2 family are computed with the browser's Web Crypto API (crypto.subtle.digest). MD5 is not part of Web Crypto, so it is computed with a small JavaScript implementation of RFC 1321. Text is hashed as UTF-8 bytes.

Known values to check against

InputAlgorithmHash
(empty)MD5d41d8cd98f00b204e9800998ecf8427e
(empty)SHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
hello worldMD55eb63bbbe01eeed093cb22bb8f5acdc3
hello worldSHA-12aae6c35c94fcfb415dbe95f408b9ce91ee846ed
hello worldSHA-256b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

Which hash should I use?

AlgorithmOutputStatus
MD5128 bits / 32 hexBroken for security; fine for non-adversarial checksums
SHA-1160 bits / 40 hexCollisions demonstrated (2017); avoid for signatures
SHA-256256 bits / 64 hexCurrent standard choice
SHA-384384 bits / 96 hexTruncated SHA-512, used in TLS suites and SRI
SHA-512512 bits / 128 hexFaster than SHA-256 on 64-bit CPUs

For storing passwords use a slow, salted algorithm such as Argon2, scrypt or bcrypt, never a plain fast hash.

Frequently asked questions

How long is a SHA-256 hash?
256 bits = 32 bytes = 64 hex characters (or 44 characters in Base64).
Can I verify a downloaded file?
Yes: choose the file and compare the SHA-256 line with the checksum the publisher lists.