Skip to content
BetterPass logo

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.

Diagram showing a one-way cryptographic hash function: input of any size enters the hash function and produces a fixed-length digest. The process cannot be reversed.

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

  • SHA3-256 — Best for: post-quantum readiness, NIST FIPS 202
  • SHA3-384 — Best for: financial security, 192-bit security level
  • SHA3-512 — Best for: classified data, long-term archival
  • SHA3-224 — Best for: embedded systems, limited resources

KDF Family

Memory-hard functions for secure password hashing and key derivation

  • Bcrypt — Best for: password storage, adaptive cost factor 12-14
  • scrypt — Best for: GPU-resistant password hashing, crypto wallet derivation
  • PBKDF2 — Best for: FIPS/NIST compliant, government/enterprise standards

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

Best: SHA-256
Alternative: SHA-512, SHA-512/256
Post-quantum: SHA3-256
Avoid: MD5, SHA-1

Password Storage

Storing user credentials, API keys, secrets

Best: Argon2id, Bcrypt
Also good: scrypt, PBKDF2
Avoid: SHA-256, MD5, unsalted

Message Authentication

API auth, JWT signing, webhook verification

Best: HMAC-SHA256
Alternative: HMAC-SHA512
Note: Requires shared secret

Post-Quantum & NIST SHA-3

NIST FIPS 202 compliance, future-proof hashing

Best: SHA3-256
Maximum security: SHA3-512
Lightweight: SHA3-224

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)
⚠ Warning: SHA-2 algorithms are fast by design — never use them directly for password hashing. They lack salt, iteration, and memory hardness. Use Bcrypt, scrypt, or PBKDF2 instead. Note: SHA-256 is vulnerable to length extension attacks; use SHA-512/256 or HMAC when this matters.

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
Note: SHA-3 uses a fundamentally different internal structure (Keccak sponge) compared to SHA-2 (Merkle-Damgård). This provides inherent resistance to length extension attacks without requiring HMAC for authentication.

Password Hashing: Argon2 vs Bcrypt vs scrypt

PropertyArgon2idBcryptscrypt
Memory HardnessHighest (tunable)No (CPU only)Yes (tunable)
GPU ResistanceStrongestModerateHigh
PHC WinnerYes (2015)NoNo
StandardRFC 9106Blowfish-basedRFC 7914
Key ParameterMemory, Time, ParallelismCost (log2 rounds)N, r, p
Max Password LenUnlimited72 bytesUnlimited
Recommendation (2026): Use Argon2id for new projects as it is the current state-of-the-art. Bcrypt remains a solid, widely compatible choice for web apps. Use scrypt for extreme hardware resistance.

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

  1. Download file + published SHA-256 checksum
  2. Open SHA-256 Hash tool
  3. Paste content → compute hash
  4. Compare with published value (exact match = intact)

Store User Password Securely

  1. Open Bcrypt Hash tool
  2. Set cost factor 12-14 (benchmark first)
  3. Paste password → generate hash
  4. Store full output ($2b$12$...) in database
  5. Verify: bcrypt.compare(input, stored_hash)

Derive Encryption Key from Password

  1. Open PBKDF2 Derivation or scrypt Hash
  2. Use high iterations (PBKDF2: 600k+) or memory cost (scrypt: N=2^16)
  3. Generate unique salt per derivation
  4. Use derived key with AES-GCM or ChaCha20-Poly1305

Sign API Request with HMAC

  1. Open HMAC Generator
  2. Select SHA-256, paste shared secret key
  3. Input: canonical request string (method + path + timestamp + body hash)
  4. Send signature in Authorization header
  5. Server verifies with same key + string

Future-Proof with SHA-3

  1. Open SHA3-256 Hash tool
  2. Paste content → compute SHA-3 hash instantly
  3. Use for NIST FIPS 202 compliance or post-quantum readiness
  4. Compare output with SHA-256 for migration planning
  5. 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 → Hashing

Password storage & salting with Bcrypt, Argon2, scrypt

Hashing → Encoding

Hex/base64 representation of hash digests

Encoding → Tokens

Base64URL in JWT

Tokens → Serialization

Protobuf for efficient token payload serialization

From the Blog

How strong should a password be in 2026?

Why length beats complexity, and how to pick passwords that survive real-world attacks.

Passwords vs passphrases: 2026 guide

The math, cracking times, and NIST guidance behind the password vs passphrase decision.

What to do after a data breach

Secure compromised passwords, enable 2FA, and prevent identity theft — step by step.