Skip to content
UniKit

PHP Password

Generate and verify PHP-style password hashes with real bcrypt (bcryptjs): cost is adjustable (4–15, default 10), output is stable per password for reproducibility and inter-verifies with PHP `password_verify()`; the default salt is password-derived and deterministic — use PHP `password_hash()` when you need a random one.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Password

Result

The result can be copied directly.

Enter a password to see its bcrypt hash

cost: 0 · Password length: 0

What this tool does

  • Generate usable bcrypt hashes for demo data.
  • Check whether a stored hash is a valid bcrypt structure.
  • Verify a known password against a hash to confirm a migration script.

Example

Input

hello-world

Output

bcrypt 哈希: $2b$10$HOB032zjVMSFjdBvIzef2.3SS2qyJELRevHF8F6s/38sJA0f2CV3i
cost: 10
盐来源: 按口令派生的确定性盐(同一口令 → 同一哈希,便于复现)
自校验: password_verify(hash) 通过
PHP 等价写法: password_hash($pw, PASSWORD_BCRYPT, ['cost' => 10])

Real bcrypt via bcryptjs, not a `password_hash(...)` string; the output inter-verifies with PHP `password_verify()`.

Frequently asked questions

Is this real bcrypt?

Yes. Generation and verification both use bcryptjs (Blowfish variant, adjustable cost), and the output verifies with PHP `password_verify()`.

Why is the hash the same for the same password?

Pure logic must be reproducible, so a password-derived deterministic salt is used by default. In production, let PHP generate a random salt with `password_hash($pw, PASSWORD_DEFAULT)`.

Which cost should I use?

Default 10. Each step doubles the work: 4 for tests, 12+ for sensitive systems, capped at 15 (higher noticeably stalls the browser).

Does it protect weak passwords?

No. bcrypt only slows offline brute force; weak passwords still fall to dictionaries — combine it with length rules and breach checks.

Keywords:php-passwordformatconverterdeveloperbcryptpassword_hash

Related tools