What SHA-256 is
SHA-256 is a cryptographic hash function from the SHA-2 family, designed by the NSA and published by NIST in 2001. It turns any input into a 256-bit value, written as 64 hexadecimal characters. The same input always gives the same hash, and the smallest change gives a completely different one.
| Input | SHA-256 |
|---|---|
| (empty) | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
| hello | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
| password | 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 |
No practical collision, two inputs with the same SHA-256 hash, has ever been found. That is why it is the usual choice for checksums, digital signatures and TLS certificates, and why Bitcoin uses it for mining and transaction IDs.
SHA-256 checksums
Many projects publish a SHA-256 checksum next to each download. If the hash of the file you received matches, the file is byte for byte the one the publisher released: not cut off, not corrupted, not swapped. Use File mode above to check it in the browser, or the built-in tools on your computer:
PowerShell's Get-FileHash uses SHA-256 unless you ask for another algorithm. The checker above accepts a line copied from sha256sum, with the file name after the hash.
Can SHA-256 be reversed?
No. There is no key and the hash keeps only a fixed 256 bits however large the input, so the original cannot be read back. Guessing is the only attack: hash candidate inputs until one matches. For a short password that can succeed; for a long random value it cannot.
Questions about SHA-256
Can a SHA-256 hash be decrypted?
No. SHA-256 is one-way: the hash does not contain the input, so there is nothing to decrypt. The only way back is to guess inputs, hash them and compare. That works for short or common passwords, which is why sites claiming to decrypt SHA-256 are really looking hashes up in lists.
How do I verify a SHA-256 checksum?
Click File above, drop in the downloaded file and paste the checksum from the download page into Compare with. A green bar means the file is exactly what the publisher released. Nothing is uploaded.
Is SHA-256 the same as SHA-2?
SHA-256 is one member of the SHA-2 family. The family also includes SHA-224, SHA-384 and SHA-512, which differ in output length and internal word size.
Is SHA-256 safe for storing passwords?
Not on its own. It is designed to be fast, so attackers can test guesses very quickly. Passwords need a deliberately slow, salted function such as bcrypt.
Does upper or lower case matter in a SHA-256 hash?
No. The hash is a number written in hex, so 2CF24D and 2cf24d are the same. The checker above ignores case.
Is my text or file sent to a server?
No. Hashing runs in your browser with the built-in Web Crypto API. Neither the text nor the file is uploaded.