Bcrypt Hash Generator
Generate bcrypt password hashes with a configurable cost factor, or verify a password against an existing hash. Shows the full hash breakdown. Runs entirely in your browser using bcryptjs.
Frequently Asked Questions
What is bcrypt and why is it used for passwords?▼
bcrypt is a password-hashing function designed in 1999 by Niels Provos and David Mazières. Unlike SHA-256 or MD5, bcrypt is intentionally slow and includes a cost factor that controls how many iterations to run. This makes brute-force attacks computationally expensive. bcrypt also automatically salts every hash, preventing rainbow table attacks.
What is the cost factor in bcrypt?▼
The cost factor (also called work factor) is a power of 2 that controls how many iterations bcrypt runs. Cost 12 means 2^12 = 4,096 iterations. Cost 13 means 8,192 iterations. Higher cost = slower hash = harder to crack. The default of 12 is currently recommended for most applications. As hardware gets faster, you should increase the cost factor over time.
What does the bcrypt hash format look like?▼
A bcrypt hash looks like: $2b$12$<salt><hash>. The $2b$ is the algorithm version (2b is standard), 12 is the cost factor, the next 22 characters are a base64-encoded random salt, and the final 31 characters are the hashed output. The full hash is always 60 characters.
Can I verify a password against a bcrypt hash without knowing the salt?▼
Yes — that's the beauty of bcrypt. The salt is embedded directly in the hash string. When verifying, bcrypt extracts the salt from the stored hash and re-hashes the candidate password with the same salt and cost factor. If the results match, the password is correct. You never need to store the salt separately.
Is bcrypt still safe in 2024?▼
bcrypt is still widely considered safe for password hashing. However, security researchers now recommend Argon2id (the 2015 Password Hashing Competition winner) for new applications, because Argon2 is more resistant to GPU-based attacks (due to memory-hardness). If you're starting a new project, prefer Argon2id. For existing bcrypt systems, continue using it — bcrypt is not broken.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
Password Generator
Free cryptographically secure password generator. Custom length (4–128 chars), character sets (uppercase, lowercase, numbers, symbols), and ambiguous character exclusion. Password strength meter inclu
Open free tool →
Password Strength Analyzer
Analyze password strength with real entropy calculation, NIST SP 800-63B compliance, estimated crack time, and character class breakdown.
Open free tool →
Password Strength Checker
Free password strength checker. Enter any password to get an instant strength rating, entropy estimate, criteria checklist, and tips to improve it. Runs 100% in your browser — nothing is stored.
Open free tool →
More Free Tools
Related Articles
Authentication Security Tools 2026: Modern Auth Patterns, MFA, Passwordless, and OAuth2
Complete guide to authentication security tools in 2026. Covers Auth0, Clerk, NextAuth.js v5, JWT security, Passkeys/WebAuthn, TOTP authenticator apps, OAuth2/OIDC, session management, and building secure auth systems with Node.js and Python.
JWT Authentication Best Practices 2026: Secure Your API Tokens
Complete JWT security guide for 2026. Covers RS256 vs HS256 signing, token storage strategies, expiry and refresh token patterns, revocation, common vulnerabilities, and a production security checklist.
Passkeys and WebAuthn Implementation Guide 2026: Browser Support & UX Patterns
Implement passkeys and WebAuthn in 2026: browser support matrix, registration and authentication flows, server-side verification, UX best practices, and library recommendations.
Zero Trust Architecture: A Practical Guide for Web Developers 2026
Implement Zero Trust for web applications: mTLS between services, SPIFFE/SPIRE identity, service mesh security (Istio/Linkerd), token-based auth patterns, and BeyondCorp-style network access.
Clerk vs Auth0 vs NextAuth vs Lucia - Authentication in 2026
A comprehensive comparison of the top authentication solutions for Next.js and modern web apps in 2026. Compare Clerk, Auth0, NextAuth.js (Auth.js), and Lucia on DX, pricing, features, and edge compatibility.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →