Bcrypt hash generator & checker

Generate bcrypt password hash and verify against an existing hash.

{{ bcryptHashChecker.message }}

{{ bcryptHashChecker.checkResult }}

Overview

Niels Provos and David Mazières created bcrypt in 1999 as part of the OpenBSD system, publishing the paper 'A Future-Adaptable Password Scheme' — a title that has aged remarkably well. The problem they wanted to solve was obvious but frequently ignored at the time: MD5 and SHA-1 were designed to be fast, which is exactly the opposite of what you want when protecting passwords. A modern GPU can run hundreds of billions of MD5 hashes per second — making offline brute-force attacks devastating when a database is compromised. Before bcrypt became widespread, it was common to find passwords stored as plain MD5, sometimes without any salt. The Adobe breach of 2013 exposed 153 million accounts with passwords stored as MD5 with a static salt shared by identical passwords — within hours, cracking tools had broken most of the common passwords.

The central innovation of bcrypt is the cost factor: a parameter that controls how many rounds of the Blowfish algorithm are executed internally (2^cost). Cost factor 10 takes about 100 ms per hash on modern CPU hardware; cost 12, about 400 ms; cost 14, 1.6 seconds. This parameter can be raised as hardware improves, without having to migrate all existing hashes — new logins simply use the new cost, and old hashes continue working with the cost at which they were generated. The full bcrypt hash string is self-contained: `$2a$12$[22-char salt][31-char hash]`. The `$2a$` prefix identifies the version, `12` is the cost factor, the following 22 characters are the randomly generated salt, and the remaining 31 are the resulting hash. You never need to store the salt separately — it is already embedded in the hash string. OWASP recommends a minimum cost factor of 10, with 12 being a good balance between security and response time in 2024.

This tool is useful for anyone who needs to debug authentication flows: verify whether a specific password matches a stored bcrypt hash without running code — handy when investigating a login bug or validating data migrated from another system. A note on the ecosystem: bcrypt dominates in PHP (`password_hash()` uses bcrypt as default since PHP 5.5), Python (the `bcrypt` library), Node.js (`bcryptjs`), and Ruby (the `bcrypt` gem). For new systems in 2024, OWASP and NIST recommend Argon2id as the first choice — winner of the 2015 Password Hashing Competition, resistant to GPU acceleration and specialized hardware (ASICs). But bcrypt remains perfectly adequate for most applications and has 25 years of production use without any known practical breaks.

Technical deep dive

Common questions summarized

  • What is this tool for?: It runs fully in your browser: useful to validate, format, or convert data in everyday development.
  • Are my inputs sent to a server?: Processing happens locally with JavaScript. We do not store what you paste into the text areas.
  • Can I use this for real production data?: Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.

Sample payload to try

  • See also the larger "Code Snippets" sample; paste this excerpt to try locally: Example — $2a$12$Q6r9Qh2m4e7dJtWQ5Fh9x.8J2v3s4t5u6w7y8z9A1B2C3D4E5F6G

Tool guide

  • What bcrypt is bcrypt is an adaptive password hashing function with embedded salt and configurable cost factor. It is widely used for password storage.

  • What the tool manipulates Plain password input, bcrypt cost/rounds, and an optional existing bcrypt hash for verification.

  • What the tool does Generates a new bcrypt hash for the typed password and, when you provide an existing hash, checks whether the password matches it.

  • Why use it Manual database login testing, legacy user migration checks, and staging troubleshooting.

Code Snippets

Code example
$2a$12$Q6r9Qh2m4e7dJtWQ5Fh9x.8J2v3s4t5u6w7y8z9A1B2C3D4E5F6G

Example

$2a$12$Q6r9Qh2m4e7dJtWQ5Fh9x.8J2v3s4t5u6w7y8z9A1B2C3D4E5F6G

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.