How to use it
- Choose Password for a random string of characters, or Passphrase for a few random words that are easier to type and remember.
- For a password, set the length with the slider and pick the character types. Tick Avoid look-alikes if you will ever read the password aloud or type it from paper.
- For a passphrase, choose the number of words and a separator.
- Five candidates appear at once. Copy the one you like. Press Generate new for five more.
- Check the strength line: the number of bits of entropy and an estimated average time to crack under a stated assumption.
Generated passwords are not saved anywhere — not on a server and not in your browser. If you close the tab without copying, they are gone. Store the one you use in a password manager.
How the passwords are generated
A cryptographic random source
Each character is chosen using crypto.getRandomValues, the browser's cryptographically secure random number generator, which is seeded by the operating system. The more familiar Math.random is not designed to be unpredictable and should never be used for secrets.
No modulo bias
The generator draws a random 32-bit number and needs to turn it into a choice among, say, 94 characters. The obvious method — take the remainder after dividing by 94 — is slightly unfair: 2^32 is not a multiple of 94, so the first few characters come up a tiny bit more often. This generator uses rejection sampling instead: numbers from the uneven tail at the top of the range are discarded and redrawn, so every character is exactly equally likely.
Entropy
Strength is measured as entropy: the number of equally likely possibilities the settings could have produced, expressed in bits. A password of length L drawn from N characters has L × log2(N) bits. All four character types give N = 94 (26 + 26 + 10 + 32 symbols), so 16 characters carry 16 × log2(94) ≈ 104.9 bits. Passphrases work the same way with words: each word from the 1,296-word EFF short list adds log2(1296) ≈ 10.3 bits.
Each extra bit doubles the work for an attacker, which is why length matters more than exotic symbols. Adding four characters to a 12-character alphanumeric password adds about 24 bits — sixteen million times the work — while switching symbols on at the same length adds only about 7 bits.
Time to crack
The time estimate assumes the attacker has stolen a database of password hashes and can test 10 billion guesses per second offline, which is realistic for fast, unsalted hashes on modern graphics cards. On average they must try half of all possibilities. Services that store passwords with slow algorithms such as bcrypt or Argon2, or that limit login attempts, are thousands to millions of times harder to attack, so treat the figure as a worst case.
Examples
| Setting | Entropy | Average time to crack at 10¹⁰ guesses/s |
|---|---|---|
| 8 lowercase letters | 37.6 bits | about 10 seconds |
| 8 letters and digits | 47.6 bits | about 3 hours |
| 12 letters and digits | 71.5 bits | about 5,112 years |
| 16 characters, all types | 104.9 bits | about 5.9 × 10¹³ years |
| 6-word passphrase | 62.0 bits | about 8 years |
| 7-word passphrase | 72.4 bits | about 9,730 years |
A six-word passphrase such as "ruby-otter-spend-cloth-tidy-sulk" is weaker than a 12-character random password but much easier to type on a phone and to remember. Use seven words or more for anything that protects other accounts, such as a password manager's master password.
Limits and good practice
- Entropy only counts if the password is used as generated. Editing it — replacing a word with your pet's name, adding "2026!" at the end — makes it more predictable than the number shown.
- Some sites reject certain symbols or cap the length. If a site refuses a password, untick Symbols or shorten it rather than editing characters by hand.
- "At least one of each type" removes a small number of possible passwords (those missing a type). The effect is far below one bit and is not subtracted from the figure shown.
- One word in the EFF list contains a hyphen ("yo-yo"). With the hyphen separator it can look like two words; the passphrase is just as strong, but choose the space separator if that would confuse you.
- Use a password manager. A unique random password for every site matters more than any single password's length, and nobody can remember dozens of them.
Frequently asked questions
Are the generated passwords stored or sent anywhere?
No. They are generated in your browser and exist only on this page until you close it. Nothing is logged, transmitted or saved to browser storage.
How long should a password be?
For a random password with letters and digits, at least 12 characters; 16 or more for important accounts. For a passphrase, at least six words, and seven or more for a master password.
Are passphrases secure?
Yes, when the words are chosen at random, as they are here. Their strength comes from the number of words, not from the words being obscure.
Why not just use Math.random?
Math.random is designed for speed, not unpredictability, and its output can sometimes be predicted. crypto.getRandomValues is the browser API meant for security purposes.
What does "bits of entropy" mean?
It is the base-2 logarithm of the number of equally likely passwords the settings could produce. Each additional bit doubles the number of guesses an attacker needs.