How the passwords are made
Every character is chosen with crypto.getRandomValues, the random number source your browser uses for encryption keys. The page never uses Math.random, which is not designed to be unpredictable.
Choosing fairly is harder than it sounds. Taking a random number and using the remainder after dividing by the alphabet size makes some characters slightly more likely. This tool throws away the few random values that would cause that and draws again, so every character is exactly as likely as every other.
When you ask for at least one character of each kind, the generator makes whole passwords and starts over until one qualifies, instead of forcing certain positions. That keeps every valid password equally likely. The cost is tiny: a 20 character password from four kinds of character loses about a tenth of a bit.
What entropy in bits means
Entropy counts how many different results the generator could have produced. One bit means two possibilities, ten bits about a thousand, and every extra bit doubles the number. A 20 character password from lowercase, uppercase, numbers and the default symbols has about 128 bits, which is out of reach for any attack that guesses.
Length does more than variety. Twelve characters drawn from all 94 printable ASCII characters give about 78.7 bits. Sixteen lowercase letters alone give about 75.2 bits. Adding four characters is worth about as much as adding every symbol you can type.
The crack times on this page are illustrations with their assumptions written out: an attacker who has stolen a list of hashes, knows your settings, and tries guesses at a stated speed. They are not predictions. A site that limits login attempts slows an attacker far more than any hash does, and none of these numbers apply to a password you made up yourself.
Passphrases: when words beat symbols
A passphrase is several random words joined together, such as three or four short words with hyphens between them. Each word here comes from a list of 1,024 and is worth 10 bits, so 6 words is 60 bits and 8 words is 80 bits. Words are easier to type on a phone and to read aloud than a string of symbols.
The strength comes entirely from the words being chosen at random. A phrase you invent, such as a lyric or a sentence about your pet, is much weaker than its length suggests. Swapping letters for look-alike symbols adds almost nothing, because attackers try those swaps first.
Six words is a reasonable default for an account protected by a slow hash. For the master password of a password manager, or anything stored behind a fast hash, use 8 words or more.
Using a generated password safely
- Never reuse one. When one site is breached, attackers try the leaked password on every other service.
- Let a password manager remember it. Random passwords are not meant to be memorised. Save it before closing this page, because it is not stored anywhere.
- Turn on two-factor sign-in wherever it is offered, since a strong password does not help if it is typed into a fake page.
- If a site rejects it, edit the symbols list or turn symbols off and make the password a few characters longer to make up for it.
If you also need identifiers rather than secrets, use the UUID generator, and to fingerprint a file use the hash generator.