Password Generator: Strong Random Passwords, Made in Your Browser
Choose a length and the kinds of character to use, then press Generate. Each password is drawn in your browser from a cryptographic random source, and the page shows how many equally likely passwords your settings could have made.
Last reviewed
Press Generate to make your password. Each press makes a new one, and nothing is saved or sent.
What this generator does
Pick a length from 8 to 128 characters, choose which kinds of character to allow, and press Generate. You get one password, or up to ten, and for each setting you choose the page shows how many bits of randomness it carries.
Passwords are made in your browser, when you press the button. They are not made when the page loads, and they are never written into the page address. A link you share carries your settings, such as length 20 with symbols on, and never a password. Nothing is stored or sent to a server.
Where the randomness comes from
A password is only as unpredictable as the source behind it. The generator uses your browser’s cryptographic random source, the one built for security tasks, and not the everyday “random” function that is meant for games and shuffling a playlist.
Turning random bytes into characters needs care too. The easy method, taking a byte (0 to 255) and dividing by the size of the character pool to keep the remainder, favours some characters. With 94 characters, 256 = 2 × 94 + 68, so the first 68 characters can each come from 3 different bytes and the other 26 from only 2. Those first 68 are then 50% more likely.
This generator removes that bias by rejection: bytes in the uneven top slice are thrown away and drawn again, so every character in the pool is exactly equally likely at every position.
Reading the strength
The strength is shown in bits. If your settings could produce N different passwords, all equally likely, the strength is log₂(N) bits. Every extra bit doubles the number of possibilities, so 52 bits is not “a bit more” than 51 but twice as many.
The number measures how unpredictable a password made by this tool is. It does not rate a password you thought up, a password you have used on another site, or one that has leaked. A random 20-character password reused on two sites is only as safe as the weaker of the two sites.
The page does not claim how long a password would take to crack. That depends on how a service stores passwords and how fast an attacker’s hardware is, and neither can be known from a web page.
The formula, with worked examples
With a pool of P characters and a password of length L, there are P^L possible passwords, and the strength is L × log₂(P) bits. Each character adds log₂(P): 3.32 bits from digits alone (P = 10), 4.70 from lower-case letters (P = 26), and 6.55 from all 94 printable ASCII characters except the space (26 + 26 + 10 + 32 symbols).
Example 1: 12 characters from all 94. 94^12 = 475,920,314,814,253,376,475,136, about 4.76 × 10²³, which is 12 × 6.5546 = 78.7 bits.
Example 2: 15 lower-case letters. 26^15 = 1,677,259,342,285,725,925,376, about 1.68 × 10²¹, which is 15 × 4.7004 = 70.5 bits.
So the short mixed password has about 284 times as many possibilities as the long lower-case one: 78.7 − 70.5 = 8.1 bits, and 2^8.1 is about 284. Both figures are for random characters, which is why a human-chosen password of the same length is usually far weaker. Note too that the 12-character one is under the 15-character minimum NIST sets for a password used alone, so more bits is not the only test.
When every type is required
If you tick “Include at least one of each type chosen”, a password missing a type is thrown away and redrawn. That keeps all the allowed passwords equally likely, and it means the possibilities are fewer than P^L. The count comes from inclusion and exclusion: take all P^L strings, subtract those missing each type, add back those missing two, and so on.
With all four types the cost is small once the password is long. At 20 characters there are 2,585,908,648,140,078,948,280,078,326,668,093,030,400 passwords, about 2.59 × 10³⁹ or 130.9 bits, against 131.1 without the rule. About 89% of draws already contain all four types, so few are redrawn.
At 8 characters the rule bites: 2,807,657,387,458,560 passwords, 51.3 bits against 52.4, because only 46% of draws contain all four types.
Reference: strength by length
Random characters from all 94, no required types:
| Length | Possible passwords | Bits |
|---|---|---|
| 8 | 94^8 ≈ 6.10 × 10¹⁵ | 52.4 |
| 12 | 94^12 ≈ 4.76 × 10²³ | 78.7 |
| 16 | 94^16 | 104.9 |
| 20 | 94^20 | 131.1 |
| 32 | 94^32 | 209.7 |
| 64 | 94^64 | 419.5 |
Each row is length × 6.5546, rounded to one decimal place.
What current guidance says
The US National Institute of Standards and Technology covers passwords in SP 800-63B-4. As summarised here from that publication:
- A password used as the only factor should be at least 15 characters. If it is one part of multi-factor sign-in, the minimum is 8.
- Services should allow passwords of at least 64 characters, so a long random one or a passphrase is accepted.
- Services should not impose composition rules, such as “one capital and one symbol”.
- Services should not force periodic changes without evidence of compromise.
- Services should check new passwords against a blocklist of known-compromised or commonly used ones.
The generator follows that spirit: the default is 20 characters, every type is optional, and it tells you when you pick a length under 15. The symbol and digit options exist because some sites still demand them.
Using a generated password well
- One password per account. A leak at one service then cannot open another.
- Keep them in a password manager rather than in your head, so there is no need to make them memorable.
- Turn on a second factor where the service offers one.
- Copy, then close the tab. The password exists only on this page until you do.
Frequently asked questions
How long should a password be?
NIST SP 800-63B-4 sets a minimum of 15 characters for a password that is the only thing protecting an account, and 8 when it is one part of multi-factor sign-in. The generator defaults to 20 characters. For a password you will never type from memory, longer costs nothing.
Do I need symbols, digits and capitals?
Not for strength alone. NIST tells services not to impose composition rules, because length and unpredictability matter more. Those types are offered because some sites still demand them. Each extra type enlarges the pool of characters and so adds a little to each position.
What does the number of bits mean?
It is log2 of the number of different passwords your settings could have produced. 51.3 bits means about 2.8 × 10^15 possibilities; each added bit doubles the number. It measures how unpredictable a password made by this tool is. It says nothing about a password you chose yourself or reuse elsewhere.
Why does requiring every type lower the bits slightly?
Passwords missing a type are thrown away and redrawn, so fewer are possible. At 8 characters with all four types the count falls from 94^8 to 2,807,657,387,458,560, which is 51.3 bits instead of 52.4. At 20 characters the loss is only 0.2 bits (130.9 against 131.1).
Is the password stored or sent anywhere?
No. It is made in your browser when you press Generate and is never written to the page address, so a shared link carries your settings and not a password. Closing the tab removes it. Copy it into a password manager straight away.
Why leave out look-alike characters?
The capital I, lower-case l and digit 1 look alike in many fonts, and so do capital O, lower-case o and zero. Leaving them out helps if you must read a password aloud or type it from paper. It shrinks the pool from 94 characters to 88, which costs about 0.1 bit per character.
Related calculators
- Random Number GeneratorSet a minimum and maximum, how many numbers you want and whether repeats are allowed, then press Generate.
- Big Number CalculatorEnter whole numbers of any size, up to 10,000 digits, and choose an operation.
- Number Sequence CalculatorChoose the type of sequence, give the first term and the rule, and say how many terms.
- Scientific CalculatorType an expression or use the keys.
- Basic CalculatorType a calculation or use the keys.
- Data Storage ConverterConvert any data size.
- Base64 Encoder and DecoderType or paste text to encode it as base64, or paste base64 to decode it.
- Epoch and Unix Timestamp ConverterEnter a Unix timestamp to see the date, or enter a date and time to get the timestamp.