SHA-256 Hash Generator
SHA-256 Hash Generator — Free Online Tool
Generate a 256-bit SHA-2 digest - the algorithm behind TLS certificates, Bitcoin and most file integrity checks. Enter your text below and press SHA-256.
SHA-256 Hash Generator
Generate a 256-bit SHA-2 digest - the algorithm behind TLS certificates, Bitcoin and most file integrity checks.
What SHA-256 Is
SHA-256 is the most widely deployed member of the SHA-2 family. It produces a 256-bit digest written as 64 hexadecimal characters, operates on 512-bit blocks, and has no known practical weakness after more than two decades of analysis. If you need a hash and have no specific reason to choose otherwise, this is the one.
| Algorithm | SHA-256 (SHA-2 family) |
|---|---|
| Digest length | 256 bits — 64 hexadecimal characters |
| Block size | 512 bits |
| Designed by | the NSA, published by NIST, 2001 |
| Specification | FIPS 180-4 |
| Status in 2026 | Secure - current default |
A worked example
Hashing the five characters hello with SHA-256 gives:
Change a single character of the input and the entire digest changes, with no resemblance to the previous one. That property is called the avalanche effect, and every cryptographic hash is designed to have it.
How SHA-256 Got Here
NIST published SHA-2 in 2001 as a replacement for SHA-1, before SHA-1 was broken - an unusually well-timed piece of standards work. Adoption was slow while SHA-1 still looked adequate, then rapid once it did not. Today SHA-256 signs almost every TLS certificate on the web, secures Bitcoin's proof-of-work and transaction identifiers, underpins the Linux package signing used by every major distribution, and is the digest most projects publish alongside a download.
Security Status of SHA-256
No collision, preimage or second-preimage attack against full SHA-256 is known. The best published attacks reach a reduced number of rounds and are far from practical. Its one theoretical relative is the length-extension property shared by all Merkle-Damgard constructions: given H(m) and the length of m, an attacker can compute H(m || padding || suffix) without knowing m. That matters only if you build a naive keyed hash as H(secret || message) - use HMAC-SHA256 instead, which is designed to resist exactly this.
Use SHA-256 for
- TLS certificates, code signing and digital signatures.
- File integrity: publishing a SHA-256 checksum next to a download is the current norm.
- HMAC-SHA256 for API request signing and message authentication.
- Blockchain and content-addressed storage, where collision resistance is the whole point.
- Deriving a key with HKDF or PBKDF2, where SHA-256 is the underlying primitive.
Do not use SHA-256 for
- Raw password storage. SHA-256 is fast by design, and speed is exactly wrong for passwords - use bcrypt, scrypt or Argon2id.
- A homemade keyed hash of the form SHA256(secret + message), because of length extension. Use HMAC.
How to Use This SHA-256 Generator
- Paste or type your text into the input box above, or upload a plain-text file.
- Press the SHA-256 button.
- The digest appears in the output box, ready to copy.
The same input always produces the same output@if($algo['status'] === 'password') — except with bcrypt, where the random salt makes every result different@endif, on this page or in any correct implementation. If a digest from another tool disagrees with this one, the cause is almost always a difference in the input: a trailing newline, a different character encoding, or invisible whitespace.
Frequently Asked Questions About SHA-256
Is SHA-256 the same as SHA-2?
SHA-2 is the family; SHA-256 is one member of it, alongside SHA-224, SHA-384 and SHA-512. When a certificate or a tool says "SHA-2" it almost always means SHA-256 in practice.
Will quantum computers break SHA-256?
Not in the way they threaten RSA and elliptic-curve cryptography. Grover's algorithm gives at most a square-root speedup on brute-force search, which effectively halves the security level - SHA-256 would offer around 128 bits of preimage resistance against a large quantum computer, which is still comfortably secure. Doubling the digest size, for instance by moving to SHA-512, restores the original margin.
Why is SHA-256 wrong for passwords when it is secure?
Secure and slow are different properties. SHA-256 is secure against collisions and preimages, but it is deliberately fast, and a leaked table of SHA-256 password hashes can be attacked at billions of guesses per second on commodity GPUs. Password hashing needs an algorithm that is expensive on purpose and salted per user.
How long is a SHA-256 hash?
256 bits, written as 64 hexadecimal characters, or 44 characters in Base64. The length never varies with the input.
Hashing in One Minute
A hash function takes input of any length and returns a fixed-length digest. Three properties define a cryptographic hash: the same input always yields the same digest, it is infeasible to recover the input from the digest, and it is infeasible to find two inputs that produce the same digest. Hashing is one-way and keyless, which is what separates it from encryption — there is nothing to decrypt, because nothing was encrypted.
Where hashes go wrong is almost always a mismatch between the job and the tool. A checksum for detecting a corrupted download and a password hash protecting a leaked database are different problems, and an algorithm that is excellent at one can be disqualifying at the other. For the full treatment — how the algorithms work internally, salting, HMAC, rainbow tables and the rest — see the complete guide to hash generation.
The Other Algorithms in This Tool
The generator above supports every algorithm below. Each has its own page explaining what it is for.