Saved

Press the star next to a tool's name to save it.

All my tools

Password Generator

Choose a length and character types to make a strong random password. It’s created on your device, and it’s never sent anywhere or saved.

A new password appears whenever you change a setting.

Your password is made on this device. It’s never sent anywhere or saved.

Your password

Choose your settings to make a password.

How long should a password be?

Length matters most. US guidance from NIST says a password used on its own should have at least 15 characters. A shorter minimum of 8 applies only when a password is one part of multi-factor sign-in. If a site allows it, go longer.

Length (all character types)Strength
8 charactersAbout 51 bits. Too short to use on its own
12 charactersAbout 77 bits
16 charactersAbout 103 bits
20 charactersAbout 128 bits

“Bits” measure how hard a random password is to guess. Each extra bit doubles the number of possibilities. These numbers only apply to random passwords, not ones a person makes up.

How this one is made

It uses your browser’s secure random number generator, not the ordinary kind. Every character is an even pick from the sets you choose, and each set you choose appears at least once. It’s made on your device, so we never see it. We don’t save it or send it anywhere.

Using your password safely

  • Use a different password for every account, especially for your bank and email.
  • Store them in a password manager, so you only need to remember one.
  • Turn on multi-factor sign-in wherever you can.
  • Change a password if you think it’s been exposed.

Some sites limit which symbols you can use. If yours rejects a password, turn off symbols and make it longer.

Working with data? Try the JSON formatter.

How to use the password generator

  1. Set the length. Type a whole number from 4 to 128 in the Length box. It starts at 16.
  2. Pick the character types. Tick or untick lowercase letters, uppercase letters, numbers and symbols. All four are on at the start.
  3. Turn on Avoid look-alikes if you’ll type it by hand. This leaves out characters that are easy to mix up when you read them, such as zero and a capital O.
  4. Read the password and its strength. A new password appears every time you change a setting. Press Make a new password for another one with the same settings.
  5. Press Copy password, then paste it into the site’s sign-up form or straight into your password manager.

Which characters it uses

Each box you tick adds one set of characters to the pool the password is drawn from.

SetCharactersHow manyWith look-alikes removed
Lowercase lettersa to z2624 (no o or l)
Uppercase lettersA to Z2624 (no O or I)
Numbers0 to 9108 (no 0 or 1)
Symbols! @ # $ % ^ & * ( ) - _ = + [ ] { } ; : , . ?2323

With all four sets the pool has 85 characters. With look-alikes removed it has 79. Spaces, quote marks, slashes and the backslash are not in the symbol set, so they never appear.

How the strength figure is worked out

The strength line is the length multiplied by the number of bits each character adds, which is log₂ of the pool size. It is shown rounded to a whole number.

  • Under 60 bits shows Weak.
  • From 60 to just under 100 bits shows Good.
  • 100 bits or more shows Very strong.

Some examples, with the figure the tool shows:

SettingsBitsShown as
16 characters, all four types103Very strong
16 characters, all types, look-alikes removed101Very strong
15 characters, all four types96Good
16 lowercase letters only75Good
6 numbers only, like a PIN20Weak

The figure assumes the password was picked at random from the whole pool, which is how this tool makes it. It does not apply to a password you change by hand afterward. Below 15 characters, the tool also shows a note about NIST’s minimum.

Where the randomness comes from

The tool draws every character with your browser’s Crypto.getRandomValues() method. MDN describes it as a way to get cryptographically strong random values, using a generator that is suitable for cryptographic purposes.[2] It does not use Math.random, which MDN lists as a non-cryptographic source of random numbers.[2]

Each pick is a random whole number. Numbers from the uneven top end of the range are thrown away and drawn again, so every character in the pool has exactly the same chance. The tool first takes one character from each set you ticked, fills the rest of the length from the whole pool, then shuffles the order. That way each type you chose is in the password, but you can’t tell where.

What official guidance says

NIST’s guidance tells sites not to force mixtures of character types and not to make you change passwords on a schedule.[1] It says sites should allow passwords of at least 64 characters, should allow password managers and autofill, and should let you paste a password.[1] So a long password with only letters can be fine, if the site allows it.

CISA, the US Cybersecurity and Infrastructure Security Agency, suggests at least 16 characters, a random mix of letters, numbers and symbols, and a different password for each account.[3] It also points out that with a password manager you only need to remember one strong password.[3] The default setting here, 16 characters with all four types, matches that advice.

Limits of this tool

  • The length must cover every type you chose. With four types ticked, a length under 4 shows an error, because each type needs at least one place.
  • It doesn’t check breach lists. A random password this long is very unlikely to be on one, but the tool doesn’t look it up.
  • It doesn’t keep a copy. If you close the page before saving the password, it’s gone. Store it in your password manager first.

What next

Use this often? Add Password to your Home screen.

Frequently asked questions

How long should my password be?

NIST guidance says at least 15 characters for a password used on its own. If a site allows it, longer is better.

Is this password generator safe?

It uses your browser’s secure random generator. The password is made on your device, and we never send or save it.

Can I make a strong password for my bank?

Yes. Use a long password that’s only for your bank, keep it in a password manager, and turn on multi-factor sign-in.

What if a site rejects my password?

Some sites limit length or symbols. Turn off symbols, or change the length, and make a new one.

Why does a 15-character password show as Good, not Very strong?

With all four character types, 15 characters gives about 96 bits, just under the 100 bits the tool needs for Very strong. Add one more character and it reaches about 103 bits.

Does Avoid look-alikes make the password weaker?

Only a little. It removes six characters from the pool, so each character adds slightly fewer bits. At 16 characters with all types, the strength drops from about 103 to about 101 bits.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools