bcrypt hash generator — salt rounds, $2b$ hashes, and password verify in your browser

Use this free online bcrypt hash generator to produce salted password hashes with a configurable cost factor (sometimes called salt rounds). Output uses the familiar modular crypt format ($2a$, $2b$, or $2y$) so you can drop results into fixtures, migration scripts, and side-by-side tests with Node.js, PHP, Python, or Ruby libraries. Click Copy (with the copy icon) on the hash field, or Upload (with the upload icon) to load a UTF-8 .txt file into the password box. Switch to Verify password to run the same bcrypt.compare check you would on the server. Everything runs locally after the page loads. When you need fast digests for checksums (not password storage), use our MD5 and SHA hash generator; when you need random candidate passwords, pair this page with the password generator.

Mode

UTF-8 byte length: 28

Range 415. Higher = slower, stronger against brute force.

Bcrypt hash

Runs in your browser with bcryptjs — nothing is uploaded. Use only for development and testing; production sign-up flows should hash on a trusted server.

What is bcrypt and how does this generator help?

bcrypt is a password-hashing function that combines a work factor with a random salt so each stored hash is unique and expensive to attack at scale. This tool helps you generate bcrypt hashes online for local development: API contract tests, seed data, and teaching how modular crypt strings look. It is not a substitute for server-side registration flows—production systems should still hash credentials on a trusted application tier with logging and rate limits you control.

The cost parameter you pick maps to how many iterations bcrypt performs internally. Higher costs raise CPU time per login attempt, which defends against offline cracking if a database leak occurs, but also increases latency for real users—benchmark on hardware that matches production and revisit the setting as CPUs get faster.

How to use this bcrypt generator (step by step)

  1. Open Generate hash and type or paste a password. Watch the UTF-8 byte length: bcrypt ignores bytes after the first 72, which surprises teams that paste long passphrases or JSON blobs.
  2. Move the cost factor slider between 4 and 15. Start near 10 for interactive testing; expect noticeably longer waits at the top of the range.
  3. Click Generate bcrypt hash. When the modular crypt string appears, use Copy (copy icon) to move it into your editor or ticket. Each run produces a different string because the salt is random—both should verify against the same plaintext.
  4. To confirm behavior end-to-end, switch to Verify password, paste the plaintext and a stored hash, then click Compare. Use Upload (upload icon) if your test vector lives in a local text file.

bcrypt vs SHA-256: when to use which tool

SHA-256 and SHA-512 are fast cryptographic hashes for integrity, release artifacts, and content-addressed caches. They are the wrong primitive for storing user passwords unless you wrap them in a proper key derivation or password hashing scheme. bcrypt is tuned for human-chosen secrets: it is slow by design and embeds salt and cost in the serialized string. If you landed here while looking for a string checksum, the hash generator page matches that intent better.

Keywords and common search intents

Teams search for a bcrypt hash generator with rounds, bcrypt online for testing, bcrypt compare online, or how many bcrypt salt rounds when they wire up auth libraries or debug “password works in Postman but not in database” issues. This page exposes the same cost and compare semantics as popular bcryptjs bindings, with visible UTF-8 limits so encoding mistakes surface early. For webhook signatures and shared-secret MACs, use the HMAC generator. You can also browse the full security and encryption tools list on the home page.

Privacy and threat model

Hashing executes in your browser tab; we do not receive your plaintext or hashes. Treat shared workstations like any other sensitive surface: avoid pasting production credentials, and clear clipboards when finished. Attackers who can run JavaScript in your session could still read inputs—this tool does not replace hardened auth endpoints or hardware security modules.

Related security and developer tools

Highlights from our catalog (each opens in place):

  • Password Strength MeterScore password entropy, estimate crack time, and get practical hardening tips.
  • AES Encrypt & DecryptEncrypt and decrypt text with AES-256 and a passphrase—runs fully in your browser.
  • RSA Key Pair GeneratorCreate 1024–4096 bit RSA public/private key pairs locally for demos and dev workflows.
  • CSP BuilderToggle Content-Security-Policy directives and copy a header value ready for your server.
  • Security Headers CheckerAnalyze security-related HTTP headers on any URL with graded guidance to harden responses.
  • JWT EncoderBuild HS256-signed JWTs from custom header and payload for API and auth testing.
  • HMAC GeneratorCreate HMAC-SHA256 or HMAC-SHA512 signatures with a secret for webhook and API verification.
  • SSL Certificate DecoderPaste PEM certificates to read subject, issuer, SANs, and validity windows.
  • .htaccess GeneratorAssemble common Apache .htaccess rules for redirects, HTTPS, caching, and access control.

Frequently asked questions

What is bcrypt and why is it used for passwords?
bcrypt is a password-hashing function designed to be slow and to include a per-password salt. Unlike fast digests (MD5, SHA-256), bcrypt’s cost factor lets you tune how much CPU time each hash takes, which makes offline guessing attacks more expensive. Stored hashes look like modular crypt strings starting with $2a$, $2b$, or $2y$ and include the cost and salt in the string.
What bcrypt cost factor (salt rounds) should I use?
Choose the highest cost your server can afford under peak login traffic, then re-benchmark yearly. Many teams use 10–12 on general-purpose hardware; higher values increase security margin but also latency for legitimate users. This tool lets you try 4–15 locally—use lower costs while iterating in tests and raise the factor for production systems after load testing.
Does bcrypt hash the full password I paste?
bcrypt only considers the first 72 bytes of the password (UTF-8 bytes, not characters). Longer strings are silently truncated. If you need to support very long passphrases, pre-hash with a fast algorithm or use Argon2 with parameters suited to your threat model—consult your framework’s guidance.
Is it safe to generate bcrypt hashes in the browser?
This page runs bcryptjs entirely in your browser for development and learning: nothing is sent to our servers. You should still avoid pasting real production secrets on shared or untrusted machines (screen capture and shoulder surfing still apply). For production user sign-up, hashing should happen on a trusted server or in a controlled backend, not in client-side JavaScript alone.
How do I verify a password against an existing bcrypt hash?
Use the Verify tab: paste the plaintext in one field and the stored bcrypt hash in the other, then click Compare. bcrypt.compare uses the cost and salt embedded in the hash string, so you do not re-specify rounds when checking passwords.
What is the difference between $2a$, $2b$, and $2y$ prefixes?
These are version markers in the modular crypt format. Implementations historically differed around null-byte handling and minor bugs; modern libraries accept and emit these variants. For interoperability, store whatever your framework generates and use the same library family on verify. bcryptjs produces hashes compatible with common OpenBSD-style parsers.
Why is my hash different every time for the same password?
bcrypt generates a random salt for each hash, so two hashes of the same password will look different but both verify correctly. The salt is embedded in the output string after the cost field—never strip it when storing hashes in your database.
How does bcrypt relate to fast hash generators like SHA-256?
SHA-256 is a fast cryptographic hash for integrity and fingerprints; it is not appropriate for storing passwords by itself. bcrypt is deliberately slow and salted for password storage. Use our SHA-family hash generator when you need checksums of files or strings, and use bcrypt (or Argon2) when modeling password storage.
Can I upload a file instead of typing the password?
Yes. Click Upload (with the upload icon) to load a UTF-8 text file into the password field—useful for long test vectors or pasted secrets from a local file. The file is read only inside your browser.