BCrypt hash will appear here
Enter a password to generate hashEvery coffee helps keep the servers running. Every book sale funds the next tool I'm dreaming up. You're not just supporting a site — you're helping me build what developers actually need.
BCrypt is a password hashing function designed by Niels Provos and David Mazières in 1999, based on the Blowfish cipher. It was first implemented in OpenBSD and is now widely used across platforms.
| Cost | Iterations | ~Time (2024 hardware) | Use Case |
|---|---|---|---|
| 10 | 1,024 | ~100ms | High-traffic APIs, mobile apps |
| 12 | 4,096 | ~300ms | Recommended default |
| 14 | 16,384 | ~1s | High-security applications |
| 16 | 65,536 | ~4s | Extreme security (key derivation) |
| Prefix | Description |
|---|---|
$2$ |
Original specification (obsolete) |
$2a$ |
Updated spec with UTF-8 support. Most common. |
$2b$ |
OpenBSD fix for wraparound bug (2014) |
$2y$ |
PHP-specific fix. Equivalent to $2b$ in practice. |
Java (Spring Security)
BCryptPasswordEncoder encoder =
new BCryptPasswordEncoder(12);
String hash = encoder.encode(password);
boolean match = encoder.matches(
password, hash);
Python
import bcrypt
hash = bcrypt.hashpw(
password.encode(),
bcrypt.gensalt(rounds=12))
bcrypt.checkpw(password, hash)
BCrypt hashes are designed to be shared safely. The recipient can use this URL to verify if they know the correct password.