Choosing a cost factor for your hardware
Measure until a single hash takes roughly 250–500 ms on your production instance. That is the balance between resisting offline attack and surviving a login stampede.
Generates and validates secure bcrypt password hashes with configurable work-factor cost rounds.
—Generates and validates secure bcrypt password hashes with configurable work-factor cost rounds.
Password: SecretPassword123!, Rounds: 10
$2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy
Uses cryptographically strong salt with adaptive work factor.
An adaptive, one-way salted password hash or verification verdict.
Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.
curl -X POST "https://yas.sh/api/v1/tools/bcrypt-tester" \
-H "Content-Type: application/json" \
-d '{"password":"SecretPassword123!","mode":"hash","rounds":10}'const res = await fetch("https://yas.sh/api/v1/tools/bcrypt-tester", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"password": "SecretPassword123!",
"mode": "hash",
"rounds": 10
}),
});
const data = await res.json();import requests
r = requests.post("https://yas.sh/api/v1/tools/bcrypt-tester", json={"password":"SecretPassword123!","mode":"hash","rounds":10})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| password | string | Yes | Plaintext password |
| mode | string | No (default hash) | Mode: 'hash' or 'verify' |
| hash | string | No | Bcrypt hash to compare (when mode=verify) |
| rounds | integer | No (default 10) | Salt rounds (4–12) |
{ "slug": "bcrypt-tester", "mode": "hash", "rounds": 10, "hash": "$2a$10$..." }Hash password or verify plaintext against bcrypt hash.
400 VALIDATION_ERROR — invalid input or unsupported option.413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).Bcrypt is a password hashing function built on the Blowfish key schedule, deliberately made slow and memory-touching. The cost factor is a base-2 exponent: cost 12 runs 2^12 key-setup iterations, and each increment doubles the work. The output string packs the algorithm identifier, the cost, a 128-bit salt and the digest into a single 60-character value, which is why bcrypt needs no separate salt column.
The salt is generated per hash, so the same password produces a different hash every time — comparing two hashes for equality is meaningless. Verification re-derives the hash using the salt and cost parsed from the stored value and compares the result in constant time.
Measure until a single hash takes roughly 250–500 ms on your production instance. That is the balance between resisting offline attack and surviving a login stampede.
A hash produced by Python's bcrypt must verify under Node's, and vice versa. Cross-checking catches encoding and prefix differences ($2a$ versus $2b$).
Before migrating an old user table, confirm the stored format parses and verifies rather than discovering it during a login outage.
Hashing the same password twice and getting different results makes the rainbow-table argument self-evident.
What this tool deliberately does not do, and where it will disagree with other implementations.