Password Generator
Generate strong random passwords with a customizable character set and length
How password strength is measured: entropy, length and crack cost
Strength is measured in entropy, not in "looks complex"
For a randomly generated password, strength is quantified by information entropy. The formula is simple:
entropy (bits) = length × log base 2 (charset size)
Entropy per character for common character sets:
| Character set | Size | Entropy per char |
|---|---|---|
| Lowercase letters | 26 | 4.70 bits |
| Upper + lower letters | 52 | 5.70 bits |
| Upper + lower + digits | 62 | 5.95 bits |
| Upper + lower + digits + common symbols | 94 | 6.55 bits |
| Diceware word list (per word) | 7776 | 12.9 bits per word |
Plugging the numbers in gives a counter-intuitive result:
- 16 lowercase letters: 16 × 4.70 = 75 bits
- 10 fully mixed characters: 10 × 6.55 = 66 bits
A longer but simpler password beats a shorter but more complex one. Complexity buys a linear amount per character, while length itself is a multiplier. Longer passwords are also easier to remember (you can combine words), so length comes first. This is why a 20-character passphrase of ordinary words can outrank a 12-character mix of symbols on real-world strength, even though the mixed string looks more "secure" at a glance.
Crack cost: why "strong enough" depends on how the other side stores passwords
Entropy only means something once you fix a "guess rate". That rate is decided entirely by how the target site stores passwords — and you do not control it:
| How they store it | Per-GPU guess rate (order) | 50 bits takes | 75 bits takes |
|---|---|---|---|
| Plaintext / reversible encryption | No cracking needed | Instant | Instant |
| Raw MD5 / SHA-1 hash | 1011 per second | Hours | Millions of years |
| bcrypt (cost 12) | 104 per second | Centuries | Far beyond the age of the universe |
| Argon2id (tuned) | 103 per second | Thousands of years | Infeasible |
The conclusion: you cannot know how the other side stores passwords, so choose as if the worst case (a fast hash) were true. That is also why the recommended minimum length has risen from 8 characters a decade ago to 12-16 today. And notice that before asking "is my password strong", the more important rule is do not reuse passwords — one leak hands over every account that shared it. Treating every account as though it were stored with a fast hash is the only safe default, because you will never be shown the other side's database.
Random source: never use Math.random
Many generators call Math.random(), which is not a cryptographically secure pseudo-random number generator. Its internal state can be reversed from observed outputs, and once the state is known, every future password it produces is predictable.
The correct call is crypto.getRandomValues() from the Web Crypto API, backed by the operating system's entropy pool; that is what this tool uses. You can verify it yourself: open the browser devtools, override Math.random, and the tool's output is unaffected — proof it does not take that path.
Practical generator issues
- Match the site's character rules. Some sites reject
< > " 'or spaces, and some cap the length. Confirm the rules before generating, or you will be forced to weaken the password after a rejection. - Ambiguous characters. When a password must be written down or read aloud, drop the groups
0 O 1 l I |. The cost is a slightly smaller charset, whose effect on total entropy is negligible — make it up with length. - Do not "require one of every class" and stop there. Forcing one uppercase and one symbol slightly reduces real entropy by limiting the combination space, and gives no real security benefit. Length is what matters.
- Passphrases. Pull 5 random words from a 7776-word list for about 64.5 bits of entropy; a string like
correct horse battery stapleis far easier to remember thanX7#kq2!. Good for a master password a human must recall.
What not to do
- Do not paste your password into an online "strength checker". Any service that needs your plaintext password sent to a server should be abandoned immediately. This tool computes locally and makes no network requests — confirm it in the Network panel.
- Do not suffix a year or site name to one base password (
Passw0rd-bank,Passw0rd-mail). One leak reveals the pattern. - Do not use "human-random" passwords built from birthdays, phone numbers or common words plus symbols. Their real entropy is far below their character count — attacker dictionaries are full of exactly these patterns.
- Do not store passwords in a plaintext text file or a screenshot. Use a password manager (a local encrypted vault or a self-hosted solution).
The tool supports custom length, charset toggles, ambiguous-character exclusion and batch generation, all local.
FAQ
Is the password strong enough?
Characters come from the cryptographic-grade random source crypto.getRandomValues. A 20-character mixed password has a search space far beyond any brute-force capability.
Will my generated passwords be saved?
No. Generation happens only in browser memory and disappears on refresh. The server receives nothing.