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.
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
- Type the password you want to hash into the input field.
- Choose a cost factor that matches how slow you want the hash to be.
- Click the generate button to create the bcrypt hash in your browser.
- Copy the resulting hash and store it in your application or database, not the plain password.
Step by step, what happens
- The tool reads the password text you enter and prepares it for hashing locally in your browser.
- It applies bcrypt with the cost factor you selected, which makes the hashing work deliberately slow.
- The tool produces a bcrypt hash string that includes the algorithm prefix, cost, salt, and hashed result.
- 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
- Paste the password into the tool and keep the cost factor at the default value or set it to the level your app uses.
- Generate the hash and wait for the browser to finish the bcrypt calculation.
- 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.
More Developer Tools Tools
Explore related calculators in this category
.htaccess Generator
Generate common .htaccess rules, force HTTPS, www redirect, and caching, with checkboxes.
API Key Generator
Generate random, secure API keys and tokens with an optional prefix. Cryptographically secure.
CSRF Token Generator
Generate cryptographically secure random CSRF tokens for forms and APIs.
Cron Expression Generator
Build cron expressions from simple schedule choices and see a plain-English description. Free online cron builder.
You Might Also Like
Popular tools from other categories
Barcode Generator
Generate Code 128 / EAN barcodes from your data.
Color Palette Generator
Generate a harmonious color palette from one base color.
Generator Sizing Calculator
Estimate generator kW needed for your loads.
Hashtag Generator
Generate relevant hashtags from a topic keyword.
Can't Find the Right Calculator?
Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.