SHA-256 (Secure Hash Algorithm 256-bit) is part of the SHA-2 family, designed by the NSA and published by NIST in 2001. It produces a 256-bit (64 hex character) digest from any input of any length. SHA-256 is the most widely deployed hash function in the world today.
You encounter SHA-256 constantly, whether you notice it or not:
SHA-256 uses the same Merkle–Damgård construction as SHA-1, but with a larger state and more rounds:
The larger state (256 vs 160 bits) and more complex round functions make SHA-256 resistant to both collision and preimage attacks with today's computing power.
A single-bit change in the input flips roughly half the output bits. Try it: hash "hello" and "Hello" — the two digests share almost no characters.
| Algorithm | Output | Security | Common Uses |
|---|---|---|---|
| SHA-1 | 160-bit / 40 chars | ❌ Deprecated | Legacy systems, Git (legacy) |
| SHA-256 (this tool) | 256-bit / 64 chars | ✅ Current standard | TLS, JWT, Bitcoin, passwords |
| SHA-384 | 384-bit / 96 chars | ✅ High security | TLS 1.3 cipher suites |
| SHA-512 | 512-bit / 128 chars | ✅ Highest in SHA-2 | High-security signatures |
Can I reverse a SHA-256 hash?
No. SHA-256 is a one-way function. There is no known algorithm that recovers the original input. Brute-forcing a random 256-bit hash would take more operations than atoms in the observable universe.
Is SHA-256 safe for storing passwords?
Not on its own. Plain SHA-256 is extremely fast, which makes it easy to brute-force millions of guesses per second. Use a slow, salted algorithm like bcrypt, Argon2, or PBKDF2 for passwords. Those algorithms use SHA-256 internally but add salt and tunable work factors.
What is SHA-256d (double SHA-256)?
SHA-256d applies SHA-256 twice: SHA-256(SHA-256(input)). Bitcoin uses this to mitigate length-extension attacks, a weakness inherent in the Merkle–Damgård construction.
How is SHA-256 different from SHA-1?
SHA-1 produces a 160-bit digest and is broken for security use. SHA-256 produces a 256-bit digest, uses 64 rounds (vs 80 shorter ones in SHA-1), and has not been broken. See the SHA-1 tool for more.
Is SHA-256 the same as AES-256?
No. SHA-256 is a hash function (one-way, no key). AES-256 is a symmetric cipher (two-way, requires a key). They are unrelated algorithms that both happen to use 256-bit values.
This website may contain affiliate links. If you click on an affiliate link and make a purchase, we may receive a small commission at no additional cost to you.