Key takeaways

  • SHA-256 cannot be decrypted: it is a one-way hash with no key, and a fixed 256-bit digest regardless of input length.
  • So-called decrypt sites match the hash against stored hashes of known strings, which works only for short or common inputs.
  • To compare a guess with a hash, hash the guess locally, for example in the free AyeTab Hash Generator, and compare the results.

No, you cannot decrypt a SHA256 hash, because it is a hash and not encryption: there is no key and no reverse function. What people call "SHA-256 decrypt" is really guessing inputs, hashing each one and checking for a match, which only works when the original was short or common.

Why there is nothing to decrypt

Encryption is built to be undone. You scramble data with a key and restore it with a key. A hash function works differently. NIST's Secure Hash Standard, FIPS 180-4, describes these algorithms as a way to produce a digest of a message so you can detect whether the message changed. The digest is a fixed 256 bits however long the input is, so a whole book and a single letter both come out as 64 hex characters. Information is thrown away on purpose, and there is no formula that brings it back.

So what do "SHA-256 decrypt" sites do?

They look the hash up. Someone has hashed a large pile of known strings (common passwords, dictionary words, short numbers) and stored the results. If your hash is in that pile, the site shows the matching input. If it is not, you get nothing.

That tells you two practical things:

  • A hash of a weak password or a short value can often be recovered this way.
  • A hash of a long random token, a file or a full document cannot.

What to do instead

What you want What actually works
Check that two pieces of text match Hash both and compare the results
Confirm a download was not altered Compare its SHA-256 with the published checksum
Get back the original text Find the original; the hash cannot give it to you
Store passwords safely Use Argon2id, scrypt, bcrypt or PBKDF2 with a salt

The last row matters. OWASP's password storage guidance says fast hashes such as SHA-256 are not suitable for passwords, because they let attackers test guesses quickly, and it recommends a unique salt per password.

Comparing hashes without leaking the input

The usual reason to search "sha256 decrypt" is that you have a hash and a guess of what produced it. The safe move is to hash your guess yourself and compare.

The free AyeTab SHA-256 tool does that in your browser. Paste the candidate text, press Generate and compare the SHA-256 it shows with the one you have. The text is not uploaded and you need no account, which matters when the guess is a real password or an API key. That is a better habit than pasting a hash into a lookup site, which then knows both the hash and that you care about it.

If the values do not match, check for invisible differences first: a trailing newline or a space changes the result completely. AyeTab shows a byte count for the input, which makes that easy to spot.

For files, use sha256sum on Linux or Get-FileHash in PowerShell instead of a browser page.

The short answer, again

SHA-256 cannot be decrypted. You can only guess and check. Hash your candidate with a local tool such as AyeTab, compare, and keep sensitive strings off sites you do not control.

Frequently asked questions

Is SHA-256 encryption?

No. It is a hash function. Encryption uses a key and can be reversed; a hash cannot.

Can a SHA-256 hash be cracked?

Only by guessing the input. Weak passwords and short values can be found that way; long random inputs are out of reach.

How do I convert a SHA-256 hash back to text?

You cannot. Find the original text, or hash a candidate and check whether it matches.

Sources

  1. FIPS 180-4, Secure Hash StandardNIST
  2. Password Storage Cheat SheetOWASP
  3. Hash GeneratorAyeTab
  4. AyeTabAyeTab
  5. sha2 utilitiesGNU Coreutils