SHA-256 Hash Generator Online
Generate SHA-256 hashes from any text. The most widely used cryptographic hash function.
Open Hash Generator →What is SHA-256?
SHA-256 (Secure Hash Algorithm 256-bit) is part of the SHA-2 family designed by the NSA. It produces a 256-bit (32-byte) hash, typically displayed as 64 hexadecimal characters. SHA-256 is the most widely used cryptographic hash function today — it secures TLS/SSL connections, Git commits, Bitcoin mining, digital signatures, and code signing. No practical collision attacks exist against SHA-256, making it the recommended choice for security-critical applications.
SHA-256 in Practice
- File integrity: Compare SHA-256 checksums to verify downloads haven't been tampered with.
- Git: Moving from SHA-1 to SHA-256 for object hashing (SHA-256 is optional in Git 2.29+).
- Blockchain: Bitcoin uses double SHA-256 (SHA-256 applied twice) for block hashing.
- API security: HMAC-SHA256 is used for signing API requests (AWS Signature v4, GitHub webhooks).
- Certificate pinning: Pin SHA-256 fingerprints of TLS certificates to prevent MITM attacks.
// Node.js
const crypto = require('crypto');
crypto.createHash('sha256').update('Hello').digest('hex');
// "185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969"
// Python
import hashlib
hashlib.sha256(b'Hello').hexdigest()
// CLI
echo -n "Hello" | sha256sum
// Browser (Web Crypto API)
const hash = await crypto.subtle.digest('SHA-256',
new TextEncoder().encode('Hello'));