Generate the SHA‑256 cryptographic hash of any text input. A member of the SHA‑2 family, SHA‑256 produces a 256‑bit (64‑character) hexadecimal digest.
SHA‑256 is a member of the SHA‑2 (Secure Hash Algorithm 2) family, designed by the National Security Agency (NSA) and published by NIST in 2001 as FIPS PUB 180‑2. It generates a fixed 256‑bit (32‑byte) hash from input of any size. Unlike MD5 or SHA‑1, SHA‑256 remains unbroken for collision resistance, making it the standard for modern cryptographic applications including TLS certificates, code signing, blockchain (Bitcoin, Ethereum), and data integrity verification.
Bitcoin uses double SHA‑256 for proof‑of‑work and address generation. Ethereum uses Keccak‑256 (SHA‑3 variant).
SHA‑256 is paired with RSA or ECDSA for secure document signing (e.g., PDF signatures, code signing).
When combined with salt and many iterations (PBKDF2, bcrypt), SHA‑256 provides robust password storage.
Note: The SHA‑256 algorithm is deterministic – the same input always produces the same hash. This property is essential for integrity checks.
| Algorithm | Output Size | Collision Resistance | Speed | Current Status |
|---|---|---|---|---|
| MD5 | 128 bits | Broken (collisions since 2004) | Very fast | Insecure for crypto |
| SHA-1 | 160 bits | Weakened (SHAttered attack, 2017) | Fast | Deprecated by browsers/CA |
| SHA-256 | 256 bits | Secure (no practical collision) | Moderate | Recommended standard |
| SHA-3 | 224/256/384/512 | Secure | Slower than SHA-2 | Alternative for future-proofing |
Bitcoin miners repeatedly hash block headers using SHA‑256 (double SHA‑256) to find a nonce that produces a hash below the target difficulty. The output is a 256‑bit number. This process secures the blockchain through proof‑of‑work. The one‑way nature of SHA‑256 ensures that finding a valid nonce requires computational work, but verifying a hash is trivial.
sha256sum on Linux, Get-FileHash on PowerShell).