SHA-512/256 Hash Generator — Truncated SHA-512 Hashing
SHA-256's output size with SHA-512's speed — the length-extension-resistant hash for key derivation and digital signatures.
Hash chaining feeds each digest back in as the next input: H(H(…H(input))). Bitcoin uses double SHA-256 (2). This is not a password KDF — use PBKDF2, bcrypt, or scrypt for passwords.
What is SHA-512/256 Hash?
SHA-512/256 builds a 64-character hash from SHA-512's internals — SHA-512's speed and strength with SHA-256's output size, and no length-extension weakness.
Zero-Server Tool Data Guarantee
All hashing happens locally in your browser. Your input is never sent to any server.
How to Use
Enter Your Text
Type or paste the text you want to hash into the input area.
View the Hash
The SHA-512/256 hash is computed instantly as you type. It is displayed as a 64-character hex string.
Verify a Checksum
Switch to the Verify tab and paste a published checksum — openssl dgst -sha512-256 output works too — to confirm it matches the hash of your input.
Copy the Result
Use the copy button to save the hash to your clipboard.
Common Use Cases
Digital Signatures
Provides a 256-bit hash suitable for digital signature algorithms with strong collision resistance.
Key Derivation
Use as the PRF in PBKDF2 for deriving encryption keys or hashing passwords with proper iteration counts.
High-Security Checksums
Generate a compact 64-character hex fingerprint for files and data with a higher security margin than SHA-256.
New Protocol Design
A modern SHA-2 choice when a protocol needs SHA-256-sized output plus inherent length-extension resistance.
Implementation Examples
async function sha512_256(message) {const msgBuffer = new TextEncoder().encode(message);const hashBuffer = await crypto.subtle.digest('SHA-512/256', msgBuffer);return Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('');}const hash = await sha512_256('hello world');// 64 hex characters (256 bits)
SHA-256 vs SHA-512/256 vs SHA-512
| Property | SHA-256 | SHA-512/256 | SHA-512 |
|---|---|---|---|
| Output size | 256-bit (64 hex) | 256-bit (64 hex) | 512-bit (128 hex) |
| Security level | 128-bit | 128-bit | 256-bit |
| Length extension resistant | No | Yes | Yes |
| Performance (64-bit) | Fast | Often fastest | Often faster |
| Performance (32-bit) | Faster | Slower | Slower |
| NIST standard | Yes (FIPS 180-4) | Yes (FIPS 180-4) | Yes (FIPS 180-4) |
Which SHA-2 Size?
| SHA-2 size | Output | Collision resistance | Best for |
|---|---|---|---|
| SHA-224 | 56 hex | 112-bit | Legacy compatibility, compact checksums on constrained systems |
| SHA-256 | 64 hex | 128-bit | General purpose — file integrity, TLS, signatures, blockchain |
| SHA-512 | 128 hex | 256-bit | Maximum security margin, high-assurance certificates |
| SHA-512/256You're here | 64 hex | 128-bit | SHA-256's size with SHA-512's speed — length-extension resistant |
All SHA-2 sizes use the Merkle-Damgård construction from NIST FIPS 180-4. SHA-224 truncates SHA-256's output, and SHA-512/256 truncates SHA-512's — which is what gives it length-extension resistance.
Production Best Practices & Security
Frequently Asked Questions
SHA-512/256 is a cryptographic hash function defined in FIPS 180-4. It uses SHA-512's internal 64-bit word structure but produces a 256-bit (64-character hex) output.
It is a truncated variant of SHA-512 with different initial hash values, combining the performance benefits of SHA-512's 64-bit operations with the convenience of a 256-bit output.
SHA-512/256 is inherently resistant to length extension attacks (where knowing H(message) doesn't let an attacker compute H(message + extra), unlike SHA-256) because truncation prevents knowing the full internal state.