What you enter stays on this device.
The strength of a random password is measured in bits of entropy, roughly its length times the base-2 logarithm of the number of possible characters, so 16 characters drawn from 90 give more than 100 bits.
Reading the entropy figure
Entropy counts, in bits, how many different passwords your settings can produce. Every extra bit doubles the number of guesses for anyone trying all the combinations.
entropy ≈ length × log2(number of possible characters)
The tool uses the scale published by ANSSI, the French cybersecurity agency: “very weak” below 64 bits, “weak” from 64 to 80, “medium” from 80 to 100 and “strong” above that. With the 90 characters on offer (26 lowercase, 26 uppercase, 10 numbers and 28 symbols), 12 characters give 77 bits, 14 give 90 and 16 reach 103. The figure shown is exact, because it allows for the rule that every ticked type must appear at least once.
Length matters more than variety. Sixteen lowercase letters on their own are worth 75 bits, almost as much as 12 mixed characters, and you need 22 of them to pass 100 bits. At the other end, a 4-digit PIN has only 10,000 combinations, roughly 13 bits. The number of bits is the base-2 logarithm of the number of combinations: to check it, work out log(10000) ÷ log(2), which gives 13.3.
Entropy by length and character set
Figures calculated by the tool and rounded down. The last column includes 28 symbols; anything in bold reaches 100 bits.
| Length | 0-9 | a-z | a-z A-Z | a-z A-Z 0-9 | a-z A-Z 0-9 + symbols |
|---|---|---|---|---|---|
| 8 | 26 | 37 | 45 | 47 | 50 |
| 10 | 33 | 47 | 57 | 59 | 64 |
| 12 | 39 | 56 | 68 | 71 | 77 |
| 14 | 46 | 65 | 79 | 83 | 90 |
| 16 | 53 | 75 | 91 | 95 | 103 |
| 20 | 66 | 94 | 114 | 119 | 129 |
| 24 | 79 | 112 | 136 | 142 | 155 |
| 32 | 106 | 150 | 182 | 190 | 207 |
How long for which account?
- Under 10 characters you stay in “very weak” territory even with symbols: 8 characters give just 50 bits.
- An everyday account that already has two-step verification: 12 characters at the very least.
- Your main email, online banking and above all the master password of a password manager deserve 16 or more. That is where you cross 100 bits.
- If it lives in a password manager and you never type it, 24 or 32 characters cost you nothing.
What the generator leaves out
Quotation marks, the apostrophe, backslash, backtick and space never appear, because too many forms reject or mangle them. The “no look-alike characters” option also drops 0, O, o, 1, l, I and |, which helps when you have to copy a password off a label, such as the Wi-Fi key on a router. That leaves 83 characters, and 16 of them still give 101 bits.
Every character comes from crypto.getRandomValues, the source of randomness browsers provide for cryptographic use. Math.random, JavaScript's everyday random function, is not used; the MDN documentation advises against it for anything security-related. It is the same source used to draw a name at random without favouring anyone.
Once you have copied it
One password per account, no exceptions, so that a breach on one site leaves your other accounts locked. Nobody remembers twenty strings like this, which is what a password manager is for: you are left with a single master password to look after. Turn on two-step verification for email and banking too, as the UK National Cyber Security Centre advises.
Need a username to go with it? The username generator draws them at random in the same way, and there are more tools of this kind under text tools and generators.
Method and sources
References used:
- Cybermalveillance.gouv.fr (France), Password best practice
- ANSSI (France), Authentication and password recommendations
- NIST SP 800-63B, Digital Identity Guidelines
- BSI (Germany), Two-factor authentication
- NCSC, Turn on 2-step verification (2SV)
- MDN, Crypto.getRandomValues() (browser cryptographic randomness)
This tool is checked by automated tests against known cases. Spotted a mistake? Report it on the contact page.
Last updated