Benchvale

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

124.6 bits

More restrictions

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 with the password strength checker.

Generate one with words instead using the passphrase generator.

Measured from this draw
Entropy
· bits
Alphabet
· chars
Length
· chars
Network requests
·
Our own script
·

Was this tool useful?

The password you generate never leaves your browser: this page doesn't send it to us or anywhere else. Once the page has loaded, you can disconnect and keep working. How we build tools
Requests: · listed · unlisted Script · Updated

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. The other ASCII symbols are left out because they tend to break shell quoting or get stripped by input filters. That choice costs about seven 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

Some generators print a single time to crack and do not say 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

How long should a password be?

At least 15 characters. NIST's current guidance, SP 800-63B-4, tells sites to require that many when a password is the only login factor. Here, 12 characters from all four classes is 74.7 bits, 15 is 93.4, and 16 is 99.7. The default is 20, which is 124.6 bits, because length costs nothing when a password manager types it.

Is it safe to use an online password generator?

It depends on whether the page sends the password anywhere, and you can check that yourself. Is it safe to use an online password generator shows how, including when to skip web pages and use your password manager's generator.

Which special characters does it use?

Thirteen: ! # $ % & * + - = ? @ ^ _. The other ASCII symbols are left out because they tend to break shell quoting or get stripped by input filters. With all four classes on, the alphabet is 75 characters. If a site needs a symbol, set Minimum symbols. At the default length, 2 digits and 2 symbols cost 0.6 bits.

Can it make a password that's easy to remember?

No. Every character is drawn at random, and that's why the bits figure holds. If a person has to remember it or type it, use the passphrase generator instead. Six random words come to 66 bits, and they're far easier to read out and type than 11 random characters.

What does "no lookalike characters" cost?

It removes l, I, 1, O, 0 and o. The alphabet shrinks from 75 to 69, and a 20 character password drops from 124.6 bits to 122.2. That's worth it for a password you'll read off a screen and type by hand.

Is the password stored or remembered?

No. It's made in this tab from crypto.getRandomValues and exists there until you leave, press Generate again, or change a setting, which draws a new one. There's no history, and a refresh loses it. Copy it into your password manager right away.

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.

Maintained by Aaron Wilson
Published . Last updated . How the tools work and how we check them: how we build tools. Something wrong? Tell us.