Password Generator
Generate random passwords or passphrases with estimated entropy in bits, using the browser cryptographic generator. Everything happens on your device: nothing is sent to any server.
How strength is estimated
1. Randomness comes from
crypto.getRandomValues (a CSPRNG). To pick each element without
bias, modulo rejection sampling is used: 32-bit values that fall into the
incomplete remainder are discarded.
2. Password: bits = length × log₂(pool size). Passphrase: bits = number of words × log₂(list size), plus the extras from the trailing number or symbol if added.
3. The estimate assumes the attacker knows the method (the pool or word list and the length). That is the correct way to measure entropy: security lies in the randomness, not in hiding how it was generated.
The word list and all character sets live in this page's code. Nothing is downloaded or queried online.
Runs locally in your browser · no sign-up · nothing leaves your browser
How it works
The generator creates random passwords (8 to 64 characters, combining lowercase, uppercase, digits and symbols) or passphrases of 3 to 8 words drawn from a 320-word Spanish list, with optional separator, capitalization and trailing number. All randomness comes from crypto.getRandomValues, the browser cryptographic generator (CSPRNG); Math.random is never used, and indices are picked with rejection sampling to remove modulo bias.
Along with each key it estimates its entropy in bits: for passwords it is length × log2(pool size) and for passphrases words × log2(320), plus log2(10) if you add a trailing digit. The estimate follows Kerckhoffs principle: it assumes the attacker knows the method and only lacks the random outcome. With those bits it rates the strength (weak below 40 bits, reasonable up to 70, strong up to 100, excellent above 100) and shows the equivalent search space.
Example: entropy of a 20-character password
- With all 4 sets enabled the pool has
26 + 26 + 10 + 24 = 86possible symbols. - Each character contributes
log2(86) ≈ 6.43 bitsof entropy. - Total:
20 × 6.43 ≈ 128.5 bits, excellent strength: the search space is around 2^128 combinations.