Free Hash Generator — Argon2, Bcrypt, Scrypt, PBKDF2, SHA
Generate cryptographic hashes entirely in your browser — no server uploads, 100% private. Choose from SHA-2 (SHA-224, SHA-256, SHA-512, SHA-512/256), SHA-3 (SHA3-224, SHA3-256, SHA3-384, SHA3-512), MD5, HMAC, Bcrypt, scrypt, PBKDF2, and Argon2. Free, instant, and works offline.
Hash a file directly — drop it into any hashing tool to compute its fingerprint without pasting contents.
What Is Cryptographic Hashing? Hash Functions Explained
Ever wonder how websites store your password without actually knowing what it is? That's cryptographic hashing — a one-way mathematical process that transforms input data of any size into a fixed-length string of characters, called a digest or hash. Unlike encryption, hashing is irreversible — you cannot recover the original input from its hash. This property makes hash functions essential for verifying data integrity, securely storing passwords, and creating digital signatures. A small change in the input produces a completely different hash (the avalanche effect), making tampering immediately detectable. Common algorithms include SHA-256, SHA-512, the SHA-3 family, and dedicated password hashing algorithms.
Common hashing use cases include password storage (Bcrypt, Argon2, scrypt, PBKDF2), file integrity verification (SHA-256 for download checksums), message authentication (HMAC for API signing), and blockchain (SHA-256 for proof-of-work). General-purpose hashes like SHA-2 and SHA-3 are fast and designed for integrity checks, while dedicated password hashing algorithms are deliberately slow and memory-hard to resist GPU and ASIC cracking attacks. For password-specific use cases, see our password security tools.
Choosing the right algorithm depends on your use case. SHA-256 is the standard for file checksums and certificate verification. SHA-3 offers post-quantum readiness and inherent resistance to length extension attacks. For password storage, Argon2id is the current gold standard (winner of the Password Hashing Competition), while Bcrypt remains a widely compatible choice. HMAC adds a secret key to hash-based authentication, preventing tampering by parties without the key. MD5 is available for legacy checksums but should not be used for security purposes. All BetterPass hashing tools run locally in your browser using the Web Crypto API or optimized JavaScript implementations — no data is ever uploaded to a server.
How Cryptographic Hashing Works
password123
Input (any size)
One-Way
ef92b778bafe771c...
Fixed-length Hash
Choose a hashing algorithm
SHA-2 Family
Traditional SHA-2 algorithms, industry-standard for most use cases
- SHA-256 — Best for: file integrity checks, software distribution checksums
- SHA-512 — Best for: 64-bit environments, high-security protocols
- SHA-512/256 — Best for: key derivation, length extension resistance
- SHA-224 — Best for: legacy certificates, constrained environments
- Hash Generator (SHA) — Best for: generating multiple SHA variants, file integrity
SHA-3 Family
Keccak-based algorithms, post-quantum ready, NIST FIPS 202 compliant
KDF Family
Memory-hard functions for secure password hashing and key derivation
HMAC/MD5 Family
Keyed hashes and legacy checksums
- HMAC-SHA256 — Best for: API authentication, JWT verification, webhook security
- MD5 — Best for: legacy checksums only, corruption detection (not for passwords)
Choosing the Right Hashing Tool
Hash algorithms aren't one-size-fits-all. The right tool depends on what you're trying to achieve:
1. File Integrity & Checksums
SHA-256 — Best for verifying file downloads, detecting corruption, and data deduplication. NIST-recommended, 256-bit output, fast (~1-2 GB/s on CPU). The standard for software distribution checksums (Ubuntu, macOS Homebrew, Docker image digests).
SHA-512 — Best for 64-bit optimized environments. Produces 512-bit output, often faster than SHA-256 on 64-bit CPUs due to larger word size. Used in high-security applications and protocols that mandate a 512-bit digest.
SHA-512/256 — Best of both worlds: SHA-512's internal security with a 256-bit output. Resistant to length extension attacks (unlike SHA-256), faster on 64-bit CPUs. Ideal for key derivation and digital signatures.
SHA-224 — Lightweight 224-bit option for constrained environments. Truncated SHA-256, used in legacy certificate chains and constrained systems. Choose SHA-256 for new projects.
2. Password Storage & Verification
Bcrypt — Best for storing user passwords. Adaptive cost factor (8-14), automatically includes salt. Blowfish-based, moderate GPU resistance. De facto standard for web applications. Use cost 12-14 for 2026.
Argon2 — The modern standard for password hashing (PHC winner). Memory-hard, provides maximum resistance against GPU/ASIC cracking. Use Argon2id variant with 3 iterations and 64MB memory.
scrypt — Best when extreme memory-hardness is required. Configurable CPU (N), block (r), and parallel (p) parameters. High GPU/ASIC resistance. Ideal for crypto wallet derivation.
PBKDF2 — Best for FIPS/NIST compliance. RFC 8018 standard, configurable iterations and hash function (SHA-256/384/512). Use 600k+ iterations. Lacks memory hardness — supplement with large salt.
3. Message Authentication
HMAC-SHA256 — Best for API authentication (AWS SigV4, webhooks). Uses SHA-256 with a secret key to provide both integrity and authenticity. Key should be ≥ 32 bytes. Use constant-time comparison to prevent timing attacks.
4. Post-Quantum & NIST SHA-3
SHA3-256 — NIST FIPS 202 standard based on Keccak sponge construction. Inherently resistant to length extension attacks — no HMAC needed for authentication. Recommended for new systems requiring post-quantum readiness.
SHA3-512 — Maximum SHA-3 security margin. 512-bit output with 256-bit collision resistance. Best for classified data, high-security digital signatures, and long-term archival integrity.
SHA3-384 — High-security SHA-3 variant (192-bit security level). Used in government and financial systems requiring NIST-approved algorithms with higher security margins than SHA-256.
SHA3-224 — Lightweight SHA-3 for constrained systems and embedded devices. Provides NIST SHA-3 compliance with minimal output size.
5. Cryptographic Randomness (MD5 — Legacy)
MD5 — Only for non-security checksums (file corruption detection, CRC replacement). Known collision attacks (since 2004) make it unsuitable for security purposes. Never use MD5 for passwords, signatures, or certificates.
Quick Algorithm Selection Guide
File Integrity & Checksums
Verifying downloads, detecting corruption, deduplication
Password Storage
Storing user credentials, API keys, secrets
Message Authentication
API auth, JWT signing, webhook verification
Post-Quantum & NIST SHA-3
NIST FIPS 202 compliance, future-proof hashing
Algorithm Deep Dive
SHA-2 Family (SHA-224, SHA-256, SHA-512, SHA-512/256)
When to Use
- File integrity verification (downloads, backups)
- Checksums for data deduplication
- Merkle trees, blockchain, git commits
- Digital signature inputs (with RSA/ECDSA)
- Key derivation (via PBKDF2 with SHA-256/512)
Key Properties
- SHA-224: 224-bit output, 56-char hex, truncated SHA-256
- SHA-256: 256-bit output, 64-char hex, fast (~1-2 GB/s CPU)
- SHA-512: 512-bit output, 128-char hex, faster on 64-bit CPUs
- SHA-512/256: 256-bit output, 64-char hex, length-extension resistant
- SHA-1: 160-bit, deprecated (collision attacks practical)
SHA-2 vs SHA-3: SHA-3 Family (Keccak — NIST FIPS 202)
When to Use
- Post-quantum cryptographic readiness
- NIST FIPS 202 compliance requirements
- Keccak-256 chains (Ethereum uses the pre-standardization Keccak variant, not NIST SHA3-256)
- Applications needing inherent length extension resistance
Key Properties
- SHA3-256: 256-bit output, sponge construction, NIST FIPS 202
- SHA3-512: 512-bit output, maximum SHA-3 security margin
- SHA3-224/384: Truncated variants for specific security levels
- All: NIST FIPS 202 standard, sponge construction, no length extension attacks
Password Hashing: Argon2 vs Bcrypt vs scrypt
| Property | Argon2id | Bcrypt | scrypt |
|---|---|---|---|
| Memory Hardness | Highest (tunable) | No (CPU only) | Yes (tunable) |
| GPU Resistance | Strongest | Moderate | High |
| PHC Winner | Yes (2015) | No | No |
| Standard | RFC 9106 | Blowfish-based | RFC 7914 |
| Key Parameter | Memory, Time, Parallelism | Cost (log2 rounds) | N, r, p |
| Max Password Len | Unlimited | 72 bytes | Unlimited |
HMAC (Hash-based Message Authentication Code)
How It Works
HMAC = H(key ⊕ opad || H(key ⊕ ipad || message)). Uses a hash function (SHA-256/512) with a secret key to produce an authentication tag.
Use Cases
- API request authentication (AWS SigV4, custom APIs)
- JWT signatures (HS256, HS512)
- Webhook signature verification (Stripe, GitHub, Slack)
- Cookie/session tamper-proofing
Security Notes
- Key should be ≥ hash output length (32 bytes for SHA-256)
- Use constant-time comparison to prevent timing attacks
- Rotate keys periodically; support multiple active keys
- Never use HMAC as a password hash — no salt, no iteration
Common Workflows
Verify File Download
- Download file + published SHA-256 checksum
- Open SHA-256 Hash tool
- Paste content → compute hash
- Compare with published value (exact match = intact)
Store User Password Securely
- Open Bcrypt Hash tool
- Set cost factor 12-14 (benchmark first)
- Paste password → generate hash
- Store full output ($2b$12$...) in database
- Verify: bcrypt.compare(input, stored_hash)
Derive Encryption Key from Password
- Open PBKDF2 Derivation or scrypt Hash
- Use high iterations (PBKDF2: 600k+) or memory cost (scrypt: N=2^16)
- Generate unique salt per derivation
- Use derived key with AES-GCM or ChaCha20-Poly1305
Sign API Request with HMAC
- Open HMAC Generator
- Select SHA-256, paste shared secret key
- Input: canonical request string (method + path + timestamp + body hash)
- Send signature in Authorization header
- Server verifies with same key + string
Future-Proof with SHA-3
- Open SHA3-256 Hash tool
- Paste content → compute SHA-3 hash instantly
- Use for NIST FIPS 202 compliance or post-quantum readiness
- Compare output with SHA-256 for migration planning
- SHA-3's sponge construction provides inherent length extension resistance
Standards Compliance
- RFC 9106: Argon2 Memory-Hard Function for Password Hashing and Key Derivation
- NIST FIPS 180-4: SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/256 — Secure Hash Standard
- NIST FIPS 202: SHA-3 standard (Keccak) — SHA3-224, SHA3-256, SHA3-384, SHA3-512
- NIST SP 800-185: SHA-3 derived functions (cSHAKE, KMAC, TupleHash)
- NIST SP 800-132: PBKDF2 with ≥100,000 iterations (FIPS 140-2 approved)
- NIST SP 800-63B: Argon2/Bcrypt/scrypt/PBKDF2 for memorized secrets; cost calibrated to ~100ms
- OWASP ASVS: v4.0.3 §2.2.1 — Use Argon2id, scrypt, Bcrypt, or PBKDF2; never plain SHA
- PCI DSS 4.0: Req 8.2.3 — Strong cryptography for passwords; salt unique per credential
Frequently Asked Questions
Your choice depends on what you're trying to do.
For file integrity or checksums, use SHA-256 or SHA-512. For post-quantum readiness or NIST SHA-3 compliance, use SHA3-256 or SHA3-512. For password storage, use Bcrypt (cost 12-14), scrypt, or PBKDF2 (100k+ iterations). For message authentication, use HMAC-SHA256.
Avoid MD5 and SHA-1 for security purposes — they have known collision vulnerabilities.
Related Tools — Explore the Full Toolchain
Working with hash digests? Learn about hex/base64 encoding →
Password storage & salting with Bcrypt, Argon2, scrypt
Hex/base64 representation of hash digests
Base64URL in JWT
Protobuf for efficient token payload serialization
From the Blog
Why length beats complexity, and how to pick passwords that survive real-world attacks.
The math, cracking times, and NIST guidance behind the password vs passphrase decision.
Secure compromised passwords, enable 2FA, and prevent identity theft — step by step.