RH
Tool

Bcrypt Generator

Generate and verify password hashes with Bcrypt

Client-side processing

Generar Hash


Verificar Hash

Acerca de Bcrypt

Bcrypt es una función de hashing diseñada para contraseñas. Incorpora un salt automático y un factor de coste configurable que lo hace resistente a ataques de fuerza bruta. A mayor número de rounds, más seguro pero más lento.

Nota: Esta implementación usa PBKDF2 como alternativa compatible en el navegador. Para producción, usa bcrypt en el servidor.

Info

Online Bcrypt Hash Generator - Hash and Verify Passwords

Why is bcrypt the standard for storing passwords?

Bcrypt is a hashing algorithm designed specifically for passwords, created in 1999 on top of the Blowfish cipher. Unlike general purpose algorithms such as MD5 or SHA, bcrypt builds in three critical features: automatic salting, so random data is added to every password and identical passwords produce different hashes; an adjustable cost factor, so you can raise the computation time as hardware improves; and deliberate slowness, since it is designed to be computationally expensive and frustrate brute force. Where MD5 can compute billions of hashes per second, bcrypt at cost factor 12 is limited to thousands, which makes mass attacks impractical.

Understanding the cost factor (work factor)

The bcrypt cost factor, also called rounds or work factor, sets how many iterations the algorithm performs as a power of two. A factor of 10 means 2^10 or 1024 iterations; factor 12 means 4096. Every increment doubles the computation time. On modern hardware, factor 10 takes about 100 ms, factor 12 about 300 ms and factor 14 about a second. Web applications typically use 10 to 12 as a balance between security and user experience, while highly sensitive data justifies 14 or more. The resulting hash embeds the factor used, so verification keeps working even after you raise the factor for new hashes.

The anatomy of a bcrypt hash and how verification works

A bcrypt hash looks like $2a$12$N9qo8uLOickgx2ZMRZoMy.MSwVX5n2j5XcZ8vNJr3zK3cF7aXvLm. Breaking it down: $2a$ marks the algorithm version, with 2a, 2b and 2y all in common use; $12$ is the cost factor; the next 22 characters are the salt in Base64; and the remaining 31 characters are the hash itself. To verify a password you do not extract the salt by hand: bcrypt reads it from the stored hash, applies the same process to the submitted password and compares. That is why you must never compare hashes as plain strings, and should always use the library verification function, which performs a constant-time comparison to defeat timing attacks.

If you work with this tool, you will probably also find these useful Hash Generator, Password Generator, AES Encryption, RSA Key Generator.

Frequently asked questions

Can I decrypt or reverse a bcrypt hash?

No. Cryptographic hashes are one-way functions by design, so there is no such thing as bcrypt decryption. The only way to find the original password is to try every possibility through brute force or run a dictionary of common passwords, and bcrypt is built to make that process extremely slow. If a password is forgotten, the only option is to reset it.

Why does the same text produce a different hash every time?

Bcrypt generates a random 16-byte salt for each hash and embeds it in the result, so even an identical password produces a completely different hash each run. That defeats rainbow table attacks, which rely on precomputed hash databases, and hides the fact that two users happen to share the same password.

Bcrypt, Argon2 or scrypt: which one should I use?

Bcrypt is battle tested, widely supported and sufficient for most cases. Argon2, which won the 2015 Password Hashing Competition, is technically superior: it resists GPU and ASIC attacks better and lets you tune memory as well as time. Scrypt is also memory hard. For new projects Argon2id is the modern recommendation, while existing bcrypt systems have no urgent reason to migrate.

Should I add a pepper on top of the bcrypt salt?

A pepper is an extra secret value stored separately from the database and concatenated to the password before hashing. It adds defence in depth: if an attacker steals the database but not the pepper, the hashes are useless. It is a worthwhile extra layer for high-security applications, although bcrypt with its salt is already secure for most cases.

© 2026
Roberto Hernando
|