Password generator
A password generator draws characters at random from an alphabet you choose. What matters is the entropy of the result: the size of the set of strings that match every restriction you turned on. This page prints that number in bits, names the arithmetic, and shows how many bits each restriction costs.
Generate a password
This figure assumes the attacker knows every setting you chose. A restriction you pick is public.
This page makes passwords. It does not store them - use a password manager.
Score a password you already have on /dev/password-strength.
Generate a passphrase instead on /dev/passphrase-generator.
- Entropy
- ·
- Alphabet
- ·
- Length
- ·
- Requests
- · from Resource Timing
- Script
- · KB of a 100 KB budget
The formula, so the number is checkable
Entropy in bits is the size of the set of strings that match every setting you chose, as a base-two logarithm. With every class on and no restriction, the alphabet here is 75 characters: 26 lowercase, 26 uppercase, 10 digits and 13 symbols. Twenty characters drawn from it is 20 × log2(75), which is 124.6 bits. That figure is honest here only because this page draws the characters at random: log2 of the search space is what entropy means for a random draw, and it is the one case where "how strong is this password" has an exact answer. NIST SP 800-63B-4 appendix A makes the opposite point about passwords a person invented, and it is right to. That appendix is informative rather than normative, so it is the argument we are agreeing with, not a rule we are citing.
The symbol set is 13 characters rather than the full 33 that ASCII offers, because the rest are the ones that break shell quoting, get eaten by badly written input filters, or are missing from a phone keyboard's first screen. That choice costs about six bits at length 20, and the line on screen always shows the alphabet size it actually used, so the number never silently disagrees with the password above it.
It is also only true if a generator really did the drawing. Entropy is a property of the process, not of the characters. The same string typed by a person is worth far less, which is the whole subject of the password strength checker next door.
Why there is no colored bar
A strength meter that shows red, amber and green is telling you something you cannot check, cannot compare between sites, and cannot act on beyond "make it longer". The bits are a number. Two passwords with the same bits are equally hard to guess, and you can carry that figure to any other tool.
What a restriction costs
A control that reads as "stronger" often shrinks the set an attacker has to cover. No repeated characters does that. So do minimum digit and symbol counts: they remove every password that lacks them. NIST dropped composition rules for this reason. Length is the lever that matters; the minimums are here because some fields still refuse a password without a digit or a symbol, and the cost line says what that refusal is worth in bits.
Class checkboxes are a selection, not a restriction. Turning digits off changes the alphabet you drew from. It does not print a cost against a 75-character baseline.
Why this page does not print a time to crack
Every generator in this category prints a single time to crack, and almost none of them says what they assumed. The honest range spans about twelve orders of magnitude and depends entirely on how the site you hand the password to chose to store it, not on the password. This page prints the bits and the arithmetic. It does not invent a clock.
Rejection sampling, not modulo
Picking a random character with random % alphabetSize is biased whenever
the alphabet does not divide the generator's range evenly. The skew is small, entirely
invisible, and it makes the entropy figure printed above it slightly false. This draws
again when a value falls in the biased tail, which costs nothing and keeps the number
honest. The randomness itself is crypto.getRandomValues, never
Math.random.
Questions
Is there a keyboard shortcut?
Control+Enter on Windows and Linux, or Command+Enter on a Mac, generates a new password when focus is inside the tool. Space is left alone so it still scrolls the page.
Is it safe to generate a password on a web page?
It depends entirely on whether the page sends it anywhere, and you should not take anyone's word for that, including ours. Open a network tab and press Generate: nothing is requested. Once the page has loaded, you can disconnect and keep working. A build-time test also fails the release if this page makes any request at all. If you would rather not trust a web page with this at all, that is a completely reasonable position, and your password manager has a generator built in.
How long should a password be?
Sixteen characters from a mixed alphabet is around 100 bits and is beyond any offline attack that exists. Twenty is the default here because it costs nothing when a password manager is doing the typing. Under twelve, the character variety stops rescuing you.
What does "no lookalike characters" cost?
It removes l, I, 1, O, 0 and o, which shrinks the alphabet from 75 to 69 and takes a twenty-character password from 124.6 bits to 122.2 bits. That is a rounding error at this scale, and it is worth it for anything you will read off a screen and type by hand.
Is the password stored or remembered?
No. It exists in this tab until you navigate away or press Generate again. There is no history, and refreshing loses it. Copy it into your password manager now rather than leaving the tab open as a note to yourself.
Should I use a password or a passphrase?
A password if a password manager is going to type it, because length is free. A passphrase if a human has to type or say it: a device unlock code, a disk encryption key, the master password for the manager itself. The passphrase generator covers that case and prints the same kind of number.
Related tools
For something you have to type from memory, the passphrase generator is the better tool. To judge a password you already have, use the password strength checker. If generating a secret in a browser tab is the question, start with is it safe to use an online password generator. And if what you need is an identifier rather than a secret, the UUID generator draws from the same random source. Whether a generator that runs in the browser is safe to use is covered in is it safe to use an online password generator.