Security tool · free · runs in your browser

Password Generator

Create random passwords with the browser's cryptographic generator. Choose the length and character sets, skip look-alike characters if you need to type the password, and see how many bits of entropy you get.

Character sets
Symbols used: ! @ # $ % ^ & * ( ) - _ = + [ ] { } : , . ?

What this password generator does

The generator creates random passwords from the character sets you choose, using the cryptographically secure random number generator built into your browser. It can make up to ten at once, guarantees at least one character from each set you tick, can leave out characters that are easy to confuse, and shows the strength of the result in bits of entropy. Passwords are created on your device and are never sent or stored.

How to generate a password

  1. Set the length. 20 characters is the default; any length from 4 to 128 works.
  2. Choose how many passwords you want.
  3. Tick the character sets. Some sites reject certain symbols; untick Symbols for those and add a few characters of length instead.
  4. Tick Avoid look-alike characters if the password will be read aloud or typed from paper.
  5. Press Generate and copy the password straight into your password manager.

How the randomness works

Each character is picked with crypto.getRandomValues, part of the Web Crypto API, which draws from the operating system's secure random source. A random 32-bit number must then be mapped to one of the characters in the pool. The obvious method, taking the number modulo the pool size, is slightly biased: 232 is not a multiple of 84, so the first few characters would come up a tiny bit more often. The generator instead uses rejection sampling: it computes the largest multiple of the pool size below 232 and discards any random value above it, so every character is exactly equally likely.

To make sure every chosen set appears, the generator draws a complete password and checks it. If a set is missing, the whole password is thrown away and a new one is drawn. Fixing a missing character by hand would make some positions predictable; redrawing keeps every accepted password equally likely.

Entropy

entropy (bits) = length × log2(pool size)

Character setsPoolBits per character
Lowercase only264.70
Lower, upper and numbers625.95
All four sets846.39
All four, look-alikes removed786.29

The figure is an upper bound: requiring each set removes a small share of possible passwords. The labels used are below 50 bits weak, 50 to 79 fair, 80 to 99 strong, and 100 or more very strong.

Worked examples

The default 20 characters

20 characters from all 84 gives 20 × 6.39 = about 127 bits. A 16-character password from the same pool gives about 102 bits.

Letters and digits only

A site that forbids symbols still allows 62 characters. 12 of them give about 71 bits; 16 give about 95.

What the bits mean

An attacker testing a trillion guesses per second against a stolen hash needs on average 279 ÷ 1012 seconds to find an 80-bit password, which is about 19,000 years. A 64-bit password would fall in about 107 days at the same rate.

Tips and common mistakes

Limits and privacy

The page needs a browser with the Web Crypto API, which every current browser has. The passwords exist only in this page until you leave or generate new ones; they are not saved, logged or transmitted. Your device's security still matters: malware or a shared screen can expose a password however it was made.

Frequently asked questions

Is this password generator secure?

It uses crypto.getRandomValues, the browser's cryptographically secure random number generator, and maps random values to characters with rejection sampling so every character is equally likely. Nothing is sent or stored.

How long should a password be?

For accounts protected by a password manager, 16 to 20 random characters is plenty. A 16-character password from all four sets has about 102 bits of entropy.

What is password entropy?

It measures how many guesses an attacker would need: length × log2(pool size). Each extra bit doubles the work. With 84 characters each one adds about 6.39 bits.

What does no modulo bias mean?

Taking a random number modulo the pool size makes some characters slightly more likely when the pool size does not divide the random range evenly. The generator discards those out-of-range values instead.

Why guarantee one character from each set?

Many sites require at least one digit or symbol. The generator draws whole passwords and keeps only those that contain every chosen set, so the accepted passwords stay uniformly random.

Should I avoid look-alike characters?

Only if you will read or type the password by hand. Removing I, l, 1, O, 0 and o shrinks the pool a little, which you can offset with one or two extra characters.

Are the passwords stored anywhere?

No. They exist only on this page until you leave or generate new ones. Save the one you use in a password manager.