Generate Password Hashes — MD5, SHA-256 & SHA-512 Online
Type any password or text into the field and this free password hash generator instantly outputs four hashes side by side — MD5 (128-bit), SHA-1 (160-bit), SHA-256 (256-bit), and SHA-512 (512-bit) — each ready to copy in one click. Use these one-way hashes for checksums, data verification, and integrity checks — and for production password storage, switch to our bcrypt generator instead.
How to Use This Password Hash Generator and Verifier
Every time you store a user's credentials, you're making a security decision that can protect or expose thousands of accounts. This password hash generator and verifier gives you instant, browser-based hashes using the algorithms that modern cybersecurity standards actually recommend — so you can debug integrations, validate your implementation choices, and understand exactly what your authentication stack is doing, all without sending a single character to a server. Because all hashing and verification happen in this browser, nothing leaves your browser at any point. This client-side hashing tool is designed for developers doing software integration debugging, testing credential storage logic, or simply learning how password hashing and salting works in practice. The bcrypt generator explains each field in the output string — version, cost, salt, and digest — so you understand the format.
Pick the Algorithm
Choose your hashing algorithm from the dropdown. For new system password hashing, start with Argon2id; for existing bcrypt deployments, select bcrypt. The selector also exposes scrypt, PBKDF2, SHA-256, SHA-512, SHA-1, and MD5, each with its own parameter controls.
Paste Your Input
Paste any text into the input field — a demo password string or plain text you want to fingerprint. Avoid real credentials in any online tool; always use test values. For bcrypt, set the cost factor (default 12, the OWASP 2026 minimum). For Argon2id, configure memory, iterations, and parallelism.
Read the Output
SHA-family hashes appear in lowercase hexadecimal — 64 chars for SHA-256, 128 for SHA-512, 40 for SHA-1, 32 for MD5. bcrypt outputs a 60-character $2b$ encoded string; Argon2id follows the PHC string format.
Compare Two Hashes
Paste a known hash alongside a candidate password to verify a match — the same operation your framework's password_verify() or checkpw() performs, useful for isolating encoding mismatches before they reach production.
Step by Step
- Select your algorithm and configure its parameters (cost factor, memory, iterations, parallelism).
- Paste your test input into the password field — use a dummy value, never a real credential.
- Click Generate and observe the hash output string along with live timing in milliseconds.
- Switch to the Verify tab, paste the hash output plus the same input, and confirm the verification returns a match.
- Optionally compare two hashes side by side to validate the cascading bit-flip effect or check a published file digest.
Supported Algorithms in This bcrypt Hash Generator & Verifier at a Glance
Password hashing is the one-way process of securing a plain text password by creating a fixed-size bit string — called a hash — using a cryptographic hash function. Unlike encryption, which is reversible with a key, hashing is one-way by design. Use the wifi password generator to create a strong router password and an instant QR code guests can scan to connect.
| Algorithm | Output Size | Memory Hard | Status / Recommended Use |
|---|---|---|---|
| Argon2id | Variable (configurable) | Yes | Recommended default for new projects — PHC winner, OWASP 2026 baseline |
| bcrypt | 60 chars (encoded) | No (CPU-hard) | Acceptable for existing deployments at cost ≥ 12; not memory-hard, 72-byte input limit |
| scrypt | Variable (configurable) | Yes | Good alternative if no Argon2id library available; N=2^17 r=8 p=1 baseline |
| PBKDF2 | Variable (digest-dependent) | No | Use when FIPS/NIST compliance is required; 600,000 iterations minimum for PBKDF2-HMAC-SHA256 |
| SHA-256 | 256 bits / 64 hex chars | No | General-purpose file digests, TLS, Git modern, blockchain — not for passwords alone |
| SHA-512 | 512 bits / 128 hex chars | No | Strong integrity checks, TLS suites; can be faster on 64-bit hardware — not for passwords alone |
| SHA-1 | 160 bits / 40 hex chars | No | Broken — legacy systems and git history only; do not use for security-sensitive comparisons |
| MD5 | 128 bits / 32 hex chars | No | Broken — non-security deduplication only; never for passwords or signatures |
What Is the Password Hashing Competition?
The Password Hashing Competition (PHC), organized by cryptography and security experts, was an open competition to raise awareness of the need for strong password hashing algorithms and to identify algorithms that can be recognized as a recommended standard. Running from 2013 to 2015, it was modeled after NIST's own algorithm selection processes and helped establish modern cryptography standards for key derivation. Argon2 was selected as the PHC winner on 20 July 2015, beating out competitors including scrypt. Its three variants — Argon2d, Argon2i, and Argon2id — each optimize for different threat models, with Argon2id recommended for general password hashing as a hybrid that resists both side-channel and GPU-based attacks.
The SHA-2 family (SHA-256, SHA-384, SHA-512) is standardized in NIST FIPS 180-4 and remains the backbone of web security protocols. SHA-1, defined in RFC 3174, is now broken for security purposes — known hash collisions exist and pre-image attacks are feasible. PBKDF2 is the FIPS-compliant workhorse and compatibility fallback for environments requiring FIPS-compliant algorithms.
Argon2id vs bcrypt Hash Generator: Which Should You Pick?
The core question in modern password security is whether your chosen algorithm resists the hardware attacks attackers actually deploy. GPU and ASIC attacks can evaluate millions of SHA-256 hashes per second on commodity hardware, making plain SHA-256 credential handling catastrophically weak.
| Algorithm | Memory Hard | GPU Resistance | Library Support | Recommended |
|---|---|---|---|---|
| Argon2id | Yes | Excellent | Growing — maintained library available in most modern runtimes | Default for new projects |
| bcrypt | No (CPU-hard) | Good | Excellent — implementations in every major language | Acceptable for existing deployments |
| scrypt | Yes | Excellent | Moderate | Use if no Argon2id library |
| PBKDF2 | No | Poor | Excellent | Only when FIPS/NIST forces it |
| SHA-256 / SHA-512 | No | None | Universal | Never for passwords |
| MD5 | No | None | Universal | Never for passwords or security |
Argon2id is a memory-hard function that forces attackers to allocate significant RAM per guess — making GPU and ASIC attacks economically prohibitive at scale. The recommended minimum sets argon2id m=19 MiB t=2 p=1; for higher-security contexts, m=64 MiB / t=3 / p=4 significantly raises attacker cost.
bcrypt uses a tunable cost factor (expressed as a power of two — cost factor 12 means 2^12 = 4,096 rounds). It is CPU-hard but not memory-hard, meaning GPU clusters can attack it faster than Argon2id. The bcrypt 72-byte input limit is a subtle gotcha: passwords longer than 72 bytes are silently truncated. Cost 13-14 is preferred for new systems; anything above 14 noticeably affects login latency.
scrypt is also a memory-hard function — the scrypt N=2^17 r=8 p=1 baseline consumes 128 MiB per verification, making it resistant to GPU and ASIC parallelization. For interactive logins on modest hardware, N=2^15 r=8 p=1 is acceptable; never use N values below 2^14.
MD5 for Non-Security Deduplication
The MD5 algorithm produces a 128-bit fingerprint — a compact digest of 32 hexadecimal characters — and is deterministic: the same string always produces the same output. This makes it useful for non-security file integrity checks, cache keys, file deduplication, and lookup identifiers. Gravatar uses MD5(email) as an avatar key — a well-known example in production. However, stop using weak hashing algorithms like MD5 and SHA-1 for anything involving secure credential storage, digital signatures, or certificates — MD5 is broken for security purposes, with known hash collisions well within the reach of modern computing.
Hash Examples to Try with the Generate Password Hashes Tool
Understanding hash structure helps you identify algorithms and verify integrity.
Same Algorithm, Tiny Input Change — The Avalanche Effect
One of the most important properties of any secure cryptographic hash algorithm is the avalanche effect: a single-character difference in the input produces a completely different output. Compare these two SHA-256 hashes produced by hashing "password" vs "Password":
Input A: password
SHA-256: 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8
Input B: Password
SHA-256: e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221aA single-bit change — uppercasing the first letter — produces a hash output that shares almost no characters with the first. The same cascading bit-flip behavior applies across SHA-512, MD5, and every other algorithm in the tool.
Verify a Download Digest with SHA-256
Software download verification is one of the most common uses of SHA-256 outside of password hashing. OS image digest values and language runtime verification hashes are published alongside downloads precisely so you can confirm the file wasn't corrupted in transit or tampered with.
Published checksum (from the download page):
SHA256:3a7bd3e2360a3d290dd0b1aef6a04e9b...ubuntu.iso
Your computed hash (after downloading):
SHA256:3a7bd3e2360a3d290dd0b1aef6a04e9b...ubuntu.iso
Result: MATCH — file is intact and unmodifiedIf the digests differ by even one character, the file was corrupted or tampered with — the same check git version control performs internally.
Anatomy of a bcrypt Hash
A bcrypt hash of a sample password like hunter2 at cost factor 12 produces a 60-character string in this structure:
$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LewdBPj/SBkF8pUmS
| | | | |
| | | 22-char base64 salt 31-char hash
| | cost factor (12 = 2^12 rounds)
| bcrypt version ($2b$ format)
algorithm prefixThe next 22 characters are the base64-encoded salt — bcrypt handles salt internally, automatically generating and embedding a cryptographically secure salt in every output. The final 31 characters are the actual hash.
Common Questions About Hash Verification & Password Security
Is it safe to use this with real passwords?
This is a client-side hashing tool — all processing runs locally in your browser using the Web Crypto API. Your input never leaves your machine, and we do not store any passwords. That said, as a matter of security best practices, you should avoid using real credentials or production secrets in any online tool. Use dummy values for debugging integrations.
Can I reverse or decrypt a hash?
No — and no other tool can either. Hash functions are one-way by design and produce output that is infeasible to invert. There is no key that reverses them, because hashing is not encryption. The only approach to crack a hash is to guess inputs and check whether their hash matches the target. Modern memory-hard parameters make brute-force attacks on Argon2id and scrypt economically prohibitive at scale.
Why won't my framework verify the hash?
The most common causes of verification failures in web application security contexts are:
- Encoding mismatch: hex vs base64 encoding — if you store the hash in hex but your library expects base64, verification always fails.
- Whitespace/line endings: a trailing newline or space in a saved hash record will cause a mismatch.
- bcrypt prefix differences: some older libraries produce
$2a$hashes while newer ones expect$2b$. - Pepper mismatch: if your deployment uses a pepper (a site-wide server secret not stored in the hash), missing it from the verification path will always fail.
- Wrong algorithm: attempting to verify using a different algorithm than was used to generate it will always fail.
What salt length should I use?
A 16-byte random salt (128 bits) is the minimum recommended across OWASP recommendations and NIST guidelines for all modern key derivation functions. For bcrypt, the salt is handled internally — it always generates and embeds a 22-character base64-encoded salt (128 bits) automatically, so you never manage it separately.
Migrating Between Hashing Algorithms Without a Password Reset
If you need to migrate from bcrypt to Argon2id without forcing a password reset, this is entirely possible using opportunistic rehashing — sometimes called a rolling migration.
- Add a hash version field to your users table:
ALTER TABLE users ADD COLUMN hash_version VARCHAR(10) DEFAULT 'bcrypt'; - On each login attempt, read
hash_versionfor the user and verify against the matching algorithm. - On a successful bcrypt verification, hash the plaintext immediately with Argon2id at your target parameters and update the saved hash, then set
hash_version = 'argon2id'. - On subsequent logins, the user's hash is already Argon2id — verify with Argon2id directly.
- For inactive users who never log in, issue a password reset prompt after a defined cutoff period.
An alternative is the wrapping strategy: hash the existing bcrypt output with Argon2id, effectively creating a hash-of-a-hash. This lets you migrate the entire database immediately without waiting for logins, but requires careful implementation. Most teams find rolling rehashing simpler to reason about for credential security.
Rolling Rehashing Login Path (Pseudo-code)
function login(username, plaintext_password):
user = db.find_user(username)
if user.hash_version == 'bcrypt':
valid = bcrypt.verify(plaintext_password, user.password_hash)
if valid:
# Opportunistic rehashing — update saved hash record
new_hash = argon2id.hash(plaintext_password, m=19456, t=2, p=1)
db.update(user.id, password_hash=new_hash, hash_version='argon2id')
elif user.hash_version == 'argon2id':
valid = argon2id.verify(plaintext_password, user.password_hash)
return validbcrypt Libraries by Language: Code Examples for Secure Development
Always use trusted libraries for creating password hashes — never roll your own cryptographic implementation.
bcrypt in Node.js
The bcryptjs package works in both Node.js and the browser; the native bcrypt npm package offers better performance server-side.
// npm install bcryptjs
const bcrypt = require('bcryptjs');
async function hashPassword(plaintext) {
const costFactor = 12; // OWASP 2026 minimum; prefer 13-14 for new systems
const hash = await bcrypt.hash(plaintext, costFactor);
return hash; // $2b$12$...
}
async function verifyPassword(plaintext, storedHash) {
const isValid = await bcrypt.compare(plaintext, storedHash);
return isValid; // true or false
}bcrypt in PHP
PHP has built-in bcrypt support via password_hash() and password_verify() — the native functions recommended for all PHP credential workflows.
<?php
$plaintext = 'hunter2';
$hash = password_hash($plaintext, PASSWORD_BCRYPT, ['cost' => 12]);
$isValid = password_verify($plaintext, $hash);
if (password_needs_rehash($hash, PASSWORD_BCRYPT, ['cost' => 13])) {
$newHash = password_hash($plaintext, PASSWORD_BCRYPT, ['cost' => 13]);
}
?>bcrypt in Java
Spring Security provides a production-ready bcrypt Java implementation via BCryptPasswordEncoder. For non-Spring projects, the jBCrypt library offers a standalone option.
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
public class PasswordService {
private static final int COST_FACTOR = 12;
private final BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(COST_FACTOR);
public String hashPassword(String plaintext) {
return encoder.encode(plaintext); // $2a$12$...
}
public boolean verifyPassword(String plaintext, String storedHash) {
return encoder.matches(plaintext, storedHash);
}
}Security note: Always choose a strong password containing special characters, lowercase and uppercase letters, and numbers when generating test hashes. The cost option you set determines your brute force resistance: tune it to produce 250-500ms hashing time on your production hardware and benchmark annually.
Common Hashing Mistakes That Undermine Password Protection
Understanding what not to do is as important as picking the right algorithm.
- Using plain SHA-256, SHA-512, SHA-1, or MD5 for storing user credentials. These are general-purpose digest algorithms — not key derivation functions designed for passwords. An attacker with GPU hardware can evaluate billions of SHA-256 hashes per second, making password cracking trivial against an unsalted SHA-256 database.
- Not using a unique random value per account. Storing unsalted hashes means every user with the same password produces the same hash, enabling a single rainbow table attack to expose all of them simultaneously.
- Setting cost factors too low. A bcrypt cost factor of 4 or 6 (common in legacy code) offers negligible brute force protection on modern hardware. Start at 12 and benchmark.
- Format inconsistency between generation and verification. Storing a hash as lowercase hexadecimal but passing it to a verifier expecting base64 will always fail. Standardize on one encoding and document it.
- Using MD5 or SHA-1 for security-sensitive comparisons in 2026. Both are broken — known hash collisions are easy to compute. Use SHA-256 as the safest default for file integrity work, and bcrypt, scrypt, or Argon2id for passwords — full stop.
Secure coding and secure development require revisiting these decisions regularly. Hardware improvements erode the protection that yesterday's cost factors provided. Establishing a password policy that includes scheduled reviews, benchmarking on current production hardware, and a migration path for outdated hashes is a cornerstone of long-term compliance and web application security.
Frequently Asked Questions
- Is it safe to use this tool with real passwords?
- Yes — all hashing is performed entirely within your browser using JavaScript. No data is transmitted to any server, logged, or stored anywhere. That said, as a best practice, avoid entering production passwords into any online tool. Use test or placeholder values when exploring hash outputs.
- Which hashing algorithm should I use for passwords?
- For storing user passwords, bcrypt, scrypt, or Argon2id are the recommended choices because they are intentionally slow and memory-hard, making brute-force attacks impractical. SHA-256 and SHA-512 are general-purpose cryptographic hashes — fast by design — which makes them unsuitable for password storage without additional key-stretching. Never use MD5 or SHA-1 for password hashing.
- Can I decrypt or reverse a password hash?
- No. Cryptographic hash functions are one-way by design — it is computationally infeasible to recover the original input from its hash. What attackers can do is try billions of guesses (brute force or dictionary attacks) and compare results. This is exactly why slow algorithms like bcrypt exist: they make each guess expensive.
- What is the bcrypt cost factor and what value should I use?
- The cost factor (also called work factor) controls how many iterations bcrypt performs internally — each increment doubles the hashing time. OWASP recommends a minimum cost factor of 10, which typically takes around 100ms on modern hardware. Use 12 or higher for high-security applications. Avoid values below 8 outside of unit testing.
- What is the difference between SHA-256 and SHA-512?
- Both are part of the SHA-2 family and are considered cryptographically secure. SHA-256 produces a 256-bit (64-character hex) output, while SHA-512 produces a 512-bit (128-character hex) output. SHA-512 offers a larger security margin and can actually be faster on 64-bit hardware. For most use cases either is fine; SHA-256 is more widely supported.
- Is MD5 still safe to use?
- MD5 is broken for security-sensitive purposes. Collision attacks against MD5 have been demonstrated in practice, meaning two different inputs can produce the same hash. It should never be used for password hashing or digital signatures. MD5 is still acceptable for non-security purposes like checksums or cache keys where collision resistance is not required.
- Why does the same bcrypt password produce a different hash each time?
- bcrypt incorporates a random salt automatically. The salt is embedded in the resulting hash string, which is why two hashes of the same password look different but can both be verified against that password. This prevents rainbow table attacks. When verifying, you pass both the plaintext and the original hash — the algorithm extracts the salt from the hash and recomputes.
- What does "hash length" mean in the output?
- Hash length refers to the number of characters in the hex-encoded (or bcrypt-encoded) output string. For example, MD5 always outputs 32 hex characters (128 bits), SHA-256 outputs 64 characters (256 bits), and SHA-512 outputs 128 characters (512 bits). bcrypt outputs a fixed 60-character string in its own encoding format, which includes the algorithm version, cost factor, and salt.