How Many Bcrypt Rounds Should I Use?

Use 10-12 rounds for most applications. 10 rounds takes ~100ms per hash on modern hardware. Increase by 1 round every 2 years. Each additional round doubles the computation time (2^n iterations), so 12 rounds is 4x slower than 10 rounds. The goal is to make hashing slow enough to deter brute-force attacks while remaining fast enough for a good user experience.

Rounds vs. Time

RoundsIterationsTime (approx.)Recommended For
8256~25msToo low for most uses
101,024~100msStandard web apps
124,096~400msHigh-security apps
1416,384~1.6sVery sensitive systems

Code Examples

Node.js

const bcrypt = require('bcrypt');
const saltRounds = 12;
const hash = await bcrypt.hash('myPassword', saltRounds);
const isMatch = await bcrypt.compare('myPassword', hash);

Python

import bcrypt
password = b'myPassword'
hashed = bcrypt.hashpw(password, bcrypt.gensalt(rounds=12))
bcrypt.checkpw(password, hashed)  # True

Try It Yourself

Use our Bcrypt Generator to generate and verify bcrypt hashes with any round count.

Frequently Asked Questions

What does the bcrypt rounds number mean?

The rounds parameter (cost factor) determines the number of iterations as a power of 2. 10 rounds = 2^10 = 1,024 iterations. Each additional round doubles the time.

Should I use bcrypt or Argon2?

Argon2id is the current OWASP recommendation. However, bcrypt is battle-tested and still perfectly secure. Choose Argon2id for new projects; bcrypt is fine for existing systems.

What is the maximum bcrypt password length?

Bcrypt truncates passwords at 72 bytes. If your users might have passwords longer than 72 characters, pre-hash with SHA-256 before passing to bcrypt.

Built by Michael Lip. 100% client-side — no data leaves your browser.