Cipher Utility

SHA-256 Hash Generator

H-03

SHA-256 of any text or file, with a checksum checker. Runs in your browser; nothing is uploaded.

Case:

256 bits, 64 hex characters

How to verify a download

  1. Find the SHA-256 on the download page.
  2. Click File and drop in the download.
  3. Paste the published value into Compare with.
  4. A green bar means the file is intact.

Worked example

One capital letter changes everything:

hello

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Hello

185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969

Further reading

Cipher Utility reference card Catalog no. H-03

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.

InputSHA-256
(empty)e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
password5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8

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:

macOS: shasum -a 256 file.iso Linux: sha256sum file.iso Windows: certutil -hashfile file.iso SHA256 PowerShell: Get-FileHash file.iso

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.