Bcrypt Hash Generator

Generate and verify bcrypt hashes — adjustable cost factor

🔒 Files never leave your browser
10
4 (fast) 14 (slow, secure)
About bcrypt: Bcrypt is a password hashing function designed to be computationally expensive. Higher cost factors make hashing slower, increasing resistance to brute-force attacks. Cost 10 is a good default; increase for higher security.

How to Use Bcrypt Hash Generator

Enter password

Type the password to hash.

Set cost

Choose cost factor (4-14).

Generate or verify

Generate hash or verify against existing hash.

Why Choose AllTools Bcrypt Hash Generator?

  • 100% free, no account needed
  • Adjustable cost factor
  • Verify mode
  • Generation time shown
  • Copy hash
  • No data stored or transmitted

Why Use This Tool

  • All processing happens locally — passwords and keys never leave your device
  • No data stored or transmitted to any server
  • Completely free with no usage limits
  • No account or registration required
  • Uses industry-standard cryptographic algorithms

What Is Bcrypt and Why It Matters

Bcrypt is a password hashing algorithm designed specifically to be slow — and that slowness is its greatest security feature. Unlike fast hashing algorithms like MD5 (which can compute 10 billion hashes per second on modern GPUs) or SHA-256 (5 billion per second), bcrypt at cost factor 12 produces only about 3-5 hashes per second on the same hardware. This makes brute-force attacks computationally impractical. A password hashed with MD5 can be cracked from a dictionary of 10 million common passwords in about 1 millisecond. The same dictionary against bcrypt at cost factor 12 would take roughly 23 days. Bcrypt also automatically handles salting — it generates a random 128-bit salt and embeds it in the output hash, so identical passwords produce different hashes. The output format is $2b$12$SALT22CHARS...HASH31CHARS... where $2b$ is the algorithm version, $12$ is the cost factor, followed by the salt and hash. This tool generates bcrypt hashes in your browser using a JavaScript implementation — your passwords are never transmitted to any server, which is exactly how security tools should work.

Choosing the Right Cost Factor

The cost factor (also called work factor or rounds) determines how many iterations bcrypt performs: the computation doubles with each increment. Cost factor 10 takes about 100ms, factor 12 about 400ms, and factor 14 about 1.6 seconds per hash. The recommended minimum for production systems in 2024 is cost factor 12, with factor 13-14 for high-security applications. The goal is to make each hash take 250ms-1 second on your server hardware — slow enough to deter attackers but fast enough that users do not notice during login. As hardware improves, you should increase the cost factor. When upgrading an existing system (say from cost 10 to 12), you can rehash passwords transparently at next login: verify the old hash, then compute and store a new hash with the higher cost factor. Bcrypt has a maximum input length of 72 bytes — passwords longer than this are silently truncated. For very long passphrases, pre-hashing with SHA-256 before bcrypt is a common workaround. Libraries exist in every major language: bcryptjs for Node.js, password_hash() in PHP, bcrypt gem in Ruby, and passlib in Python.

Related Resources

Frequently Asked Questions

What cost factor should I use?
Default is 10. Higher values are more secure but slower. 12 is recommended for production.
Is there a file size limit?
No strict limit. Processing happens in your browser, so capacity depends on your device memory. Most files work smoothly.
Which browsers are supported?
All modern browsers including Chrome, Firefox, Safari, Edge, and Opera on both desktop and mobile.
Can I use this offline?
Yes. Once the page is loaded, the tool works without an internet connection since all processing is local.
Is my data secure?
Yes. Your data never leaves your browser. Nothing is stored on or transmitted to any server.
Does this work on mobile?
Yes. All AllTools tools are fully responsive and work on phones and tablets.

Related Articles

Related Tools

Dev

Hash Generator MD5/SHA

Generate and compare MD5, SHA-1, SHA-256, SHA-512 hashes instantly

Dev

HMAC Generator

Generate HMAC hashes — SHA-256, SHA-512 with Web Crypto

Security

Password Generator

Generate passwords, passphrases, and PINs — custom

Security

Password Strength Checker

Test password strength with entropy and crack time estimates

Security

.htpasswd Generator

Generate .htpasswd entries — SHA1 and bcrypt hashing

Security

AES Encrypt/Decrypt

Encrypt and decrypt text with AES-GCM — password-based