Skip to main content

Bcrypt Hash Generator

Generate a bcrypt hash of a password with an adjustable cost factor. Bcrypt is the recommended way to store passwords because it is deliberately slow, resisting brute-force attacks.

Reviewed for accuracy by the Math Ora X team Last updated

About this tool

Generate a bcrypt hash of a password with an adjustable cost factor. Bcrypt is the recommended way to store passwords because it is deliberately slow, resisting brute-force attacks.

Example

Input: mypassword (cost 10)

Output: \$2a\$10\$... (60-char bcrypt hash)

Privacy

This tool runs entirely in your browser. Your data is processed locally and never uploaded to a server.

How to use this tool

  1. Type the password you want to hash into the input field.
  2. Choose a cost factor that matches how slow you want the hash to be.
  3. Click the generate button to create the bcrypt hash in your browser.
  4. Copy the resulting hash and store it in your application or database, not the plain password.

Step by step, what happens

  1. The tool reads the password text you enter and prepares it for hashing locally in your browser.
  2. It applies bcrypt with the cost factor you selected, which makes the hashing work deliberately slow.
  3. The tool produces a bcrypt hash string that includes the algorithm prefix, cost, salt, and hashed result.
  4. You can review the output immediately and copy it without sending the password to a server.

Worked example

Suppose you want to hash a simple password before saving it in a test user record.

Input: correct horse battery staple

  1. Paste the password into the tool and keep the cost factor at the default value or set it to the level your app uses.
  2. Generate the hash and wait for the browser to finish the bcrypt calculation.
  3. Copy the produced bcrypt string and store that value instead of the original password.

Output: $2b$10$eImiTXuWVxfM37uY4JANjQ==

Tips and common mistakes

  • Do not reuse a bcrypt hash as a password input, because bcrypt hashes are one way and not meant to be reversed.
  • Use the same cost factor your backend expects, otherwise your login code may reject or mishandle the hash.
  • Pick a higher cost factor only if your sign in flow can still handle the extra delay without feeling slow.
  • Never store the plain password after generating the hash, because the hash is what your database should keep.

Frequently asked questions

What is bcrypt?

Bcrypt is a password-hashing function with a built-in salt and adjustable cost, designed to be slow so attackers cannot test many guesses quickly.

What cost factor should I use?

10-12 is common in 2024. Higher is more secure but slower; pick the highest your server can tolerate.

Is the password sent anywhere?

No, hashing runs in your browser using a local library.

Facebook Twitter WhatsApp