Password Generator
Generate a password from cryptographic randomness, with control over length and character types, and an honest entropy-based strength reading.
How it works
Each character is drawn from your chosen alphabet using the browser's cryptographic random number generator. That distinction matters: Math.random is predictable enough that passwords built on it have been recovered in practice.
Strength is reported as entropy in bits, calculated from the alphabet size and the length — not from a rule-of-thumb checklist. Length buys more entropy than variety does, which is why a long lowercase password beats a short one full of symbols.
The formula
Entropy
bits = length × log₂(alphabet size)
Guesses to crack
average guesses = 2^bits ÷ 2
Alphabet size
26 lower + 26 upper + 10 digits + 32 symbols = 94
Worked examples
| Scenario | Working | Result |
|---|---|---|
| 8 characters, all types | 8 × log₂(94) | About 52 bits — weak today |
| 20 characters, all types | 20 × log₂(94) | About 131 bits — very strong |
| 20 lowercase letters | 20 × log₂(26) | About 94 bits — still strong |
When you'd use it
- Creating a password for a new account
- Generating a database or service credential
- Producing an API key or shared secret
- Replacing a password after a breach notification
Common questions
How long should a password be?
16 characters or more for anything that matters, and longer for accounts protecting money or identity. Length raises entropy faster than adding symbol types does, so extend before you complicate.
Is generating a password in a browser safe?
Here, yes — it uses the Web Crypto API and nothing is transmitted, logged or stored. The password exists only on this page until you close the tab. Still, use a password manager to store it; retyping from memory pushes people towards weaker choices.
Should I avoid look-alike characters?
Only when a human will read the password aloud or type it from paper, where I, l, 1, O and 0 cause errors. It slightly reduces entropy, so leave it off when the password goes straight into a manager.

