Password Generator

Published Updated

Make a random password of 8 to 64 characters from the letters, digits and symbols you choose, drawn with your browser's crypto random generator.

What the strength meter shows

Entropy starts from length x log2(pool size), with a pool of 26 uppercase + 26 lowercase + 10 digits + 8 symbols = 70 characters when all are on. Because every ticked type is guaranteed, the meter uses the exact figure for this generator, 1.4 bits lower at 8 characters and 0.5 at 16. Crack time is the average number of guesses, at 10 billion per second, for an attacker who knows your settings and tries the likeliest passwords first:

SettingsEntropyMeterTime shown
8 characters, all four types48 bitsFairabout 2.7 hours
12 characters, all four types73 bitsStrongabout 11,000 years
16 characters, all four types (default)98 bitsVery Strongmore than 300 billion years
16 characters, lowercase + digits83 bitsVery Strongabout 10.8 million years
12 characters, letters + digits71 bitsStrongabout 3,700 years
8 digits only27 bitsWeakunder a second

The meter's bands: under 40 bits Weak, 40 to 59 Fair, 60 to 79 Strong, 80 and up Very Strong. Exclude Ambiguous shrinks the pool to 65 characters, which costs about 1.7 bits at 16 characters.

What current guidance says

The US National Institute of Standards and Technology sets password rules in SP 800-63B. For a password used on its own, services (verifiers, in NIST's terms) "SHALL require" it to be "a minimum of 15 characters in length". They "SHOULD permit a maximum password length of at least 64 characters", "SHALL NOT impose other composition rules", "SHALL compare the prospective secret against a blocklist" of commonly used, expected or compromised passwords, and "SHALL allow the use of password managers and autofill functionality", with pasting a SHOULD.

For you that means: let a generator make the password, make it long, store it in a password manager and use a different one for every site. Character types help only when a site demands them.

How each character is drawn, checked over 10 million draws

Every character, and every swap in the final shuffle, comes from the page's secureRandomIndex. It asks crypto.getRandomValues for one random byte, 0 to 255, keeps the byte only when it is below the largest multiple of the pool size and draws again otherwise; the kept byte modulo the pool size picks the character. For the 70-character pool, bytes 210 to 255 are drawn again. MDN describes getRandomValues as a way to get "cryptographically strong random values".

The tool's own code made 10,000,000 draws per pool size in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app), and a chi-square test compared the counts with equal shares:

PoolBytes drawn againBytes per character, expected / measuredp-value: Chrome 157 / Firefox 155 / WebKit build
70 (all four types)46 of 2561.2190 / 1.2188 to 1.21920.134 / 0.344 / 0.845
65 (all four, Exclude Ambiguous)61 of 2561.3128 / 1.3126 to 1.31330.154 / 0.825 / 0.644
62 (letters and digits)8 of 2561.0323 / 1.0321 to 1.03230.944 / 0.996 / 0.800
36 (lowercase and digits)4 of 2561.0159 / 1.0158 to 1.01590.666 / 0.804 / 0.0101
10 (digits only)6 of 2561.0240 / 1.02400.146 / 0.0769 / 0.370
70 with a plain byte % 70 (not what the tool does)none1 (no second draw)under 0.0001 in all three

A fair draw gives p-values spread between 0 and 1; a biased one gives values near 0. The lowest of the fifteen tool rows, 0.0101, is a value the smallest of fifteen fair tests falls to or below about one time in seven. The last row shows the bias the second draw removes: with a plain byte % 70, the first 46 characters came up 1.33 times as often as the other 24 in every browser.

Why symbols and digits come up more often than letters

One character of each ticked type is drawn first and the rest come from the whole pool, so the small pools get more than an even share. At 16 characters with all four types each symbol is expected at (1/8 + 12/70) / 16 = 1.853% of positions and each letter at (1/26 + 12/70) / 16 = 1.312%, where a plain draw would give every character 1/70 = 1.429%. Measured over 10,000,000 characters per browser:

Share of all characters, per character16 characters: expected16 characters: measured8 characters: expected8 characters: measured
each uppercase letter1.312%1.311% to 1.312%1.195%1.195% to 1.196%
each lowercase letter1.312%1.312%1.195%1.195%
each digit1.696%1.696% to 1.697%1.964%1.962% to 1.964%
each symbol1.853%1.852% to 1.854%2.277%2.276% to 2.278%

In each browser none of the 625,000 sixteen-character and 1,250,000 eight-character passwords lacked a ticked type, none repeated within its set, and the type found at a position did not depend on the position (chi-square p from 0.096 to 0.74), which is what the final shuffle is for. With Exclude Ambiguous on, O, 0, l, 1 and I did not appear once in 10,000,000 characters per browser.

Entropy at each length and setting

Bits of entropy for this generator, computed with its own passwordStats function in Node.js 22.23.1. The figure accounts for the one character drawn first from each ticked type, so it sits a little under length x log2(pool size); a run through every random path of four small settings gave the same values.

LengthAll four (70)Exclude Ambiguous (65)Letters and digits (62)Lowercase and digits (36)Lowercase only (26)Digits only (10)
847.646.747.141.237.626.6
1272.871.571.262.056.439.9
1591.489.889.177.570.549.8
1697.695.895.182.775.253.2
20122.2120.1119.0103.494.066.4
32196.0192.5190.5165.4150.4106.3
64392.2385.4381.0330.9300.8212.6

At the 15-character minimum NIST sets for a password used on its own, all four types give 91.4 bits; 21 characters is the shortest length that reaches 128 bits (128.4).

Generating a password

  1. Step 1

    Set the length

    Drag from 8 to 64 characters; 16 is the default. Each change makes a new password straight away.

  2. Step 2

    Choose character types

    Uppercase, lowercase, numbers and the symbols ! @ # $ % ^ & *. Exclude Ambiguous removes look-alikes: 0 and O, 1 and l, and the capital i.

  3. Step 3

    Copy it into your password manager

    The copy button puts it on the clipboard. The regenerate button next to the password draws a fresh one with the same settings.

Other password and code tools

Password generator questions

How long should a password be?

NIST SP 800-63B says services "SHALL require" a password used on its own to be "a minimum of 15 characters in length". They MAY allow shorter ones that are only used alongside another factor, but SHALL require at least eight, and they "SHOULD permit" at least 64. The default of 16 meets the 15-character rule; with all four types it is 97.6 bits by this generator's own count.

Do I need symbols and numbers?

Length matters more. NIST SP 800-63B says services "SHALL NOT impose other composition rules", such as required mixtures of character types. Still, many sites require them, so all four types are on by default. A 16-character password from all four types has about 98 bits of entropy; 16 lowercase letters and digits still give about 83.

How is the crack time worked out?

It is the average number of guesses an attacker needs who knows your settings and tries the likeliest passwords first, at 10 billion guesses a second, a figure for a fast offline attack on a leaked database. With one character type that is half of all combinations; with several it is a little less, because every ticked type is guaranteed.

Does every password contain each type I ticked?

Yes. One character of each ticked type is drawn first, the rest come from all ticked types, and the whole password is then shuffled, so those characters can land anywhere. In a test of 200,000 passwords at 8 characters and another 200,000 at 16, none lacked a ticked type.

Is the password random enough?

Every draw, the shuffle included, uses the browser's crypto.getRandomValues with rejection sampling, so no value is favoured by rounding. The password is made on your device; no request carries it, and the page does not save it in browser storage.

Why only eight symbols?

The tool uses a fixed set of eight common symbols: ! @ # $ % ^ & *. If a site refuses one of them, press regenerate for a new password, or untick Symbols and add two characters of length, which more than makes up the difference.

Why does my password have so many symbols?

Because every password gets one symbol drawn first. With 16 characters and all four types, each of the 8 symbols took 1.85% of positions over 10,000,000 characters per browser, against 1.31% for each letter; at 8 characters it was 2.28% against 1.20%. A 16-character password still averages about 2.4 symbols and 10.9 letters, since there are 8 symbols and 52 letters.

Which characters does Exclude Ambiguous remove?

Exactly five: capital O, zero, lowercase l, one and capital I. The pool drops from 70 to 65 characters, and none of the five appeared in 10,000,000 characters per browser with the option on. Other characters that some fonts blur, such as lowercase o or capital S next to 5, stay in.

How long must a password be for 128 bits?

With all four types, 21 characters (128.4 bits by this generator's own count). Letters and digits need 22 (130.9), lowercase and digits 25 (129.2), lowercase only 28 (131.6) and digits only 39 (129.6).

Can two people get the same password?

Not in our test: in each browser, no password came out twice within any of the three sets made (625,000 at 16 characters, 1,250,000 at 8 and 625,000 at 16 with Exclude Ambiguous).

Related Tools