Password generator

Make a random password or a passphrase of random words, see how many bits of strength it has, and copy it. It is made in your browser and is not stored or sent anywhere.

Password generator

How to make a strong password

  1. Choose a type: Random password or Passphrase (random words).
  2. For a password, set the length (4 to 128) and tick the kinds of character the site accepts. For a passphrase, set the number of words (3 to 20), the separator and whether to capitalize.
  3. Read the line under the result. It gives the strength in bits and the size of the character or word pool.
  4. Press Copy and paste the result into the password field or your password manager. Generate new makes a different one.
  5. Set How many to get up to 20 at once. Copy puts them on the clipboard one per line.

How the password generator makes a password

Every character comes from crypto.getRandomValues, the random number generator built into your browser. The page never uses the ordinary Math.random. A raw random number is cut down to the pool size with a rejection step that throws away leftovers, so no character is favoured. We drew 102,400 digits in Chromium and counted them: the chi-square was 8.39 against a limit of 21.67 (9 degrees of freedom, p = 0.001). With a pool of 7 symbols, 70,000 draws gave 5.03 against 16.81.

If you tick lowercase, uppercase, digits and symbols, the result always contains at least one of each. The page draws a whole password and tries again if a kind is missing. In 1,000 passwords of 6 characters, and in 1,000 of 4 characters (the shortest allowed), every one had all four kinds. Among 500 passwords of 16 characters there were no duplicates. Twenty passwords of 128 characters took 8 ms.

Reading the strength figure

The figure is the length times log2 of the pool size. The default, 16 characters from 87 (26 + 26 + 10 + 25 symbols), gives 16 × log2(87) = 103 bits, shown as "About 103 bits of strength from 87 possible characters per position: very strong." The number is rounded down.

That formula counts every string, including ones that miss a kind. Because the page insists on every kind, the true count is a little lower. We worked it out exactly for each setting below. At 16 characters the page overstates by 0.24 bit, at 12 characters by 0.46 bit, at 20 by 0.14 bit, and from 64 characters up by nothing you could measure. At 4 characters the page says 25 bits and the exact figure is 22. If you limit the symbols to two (!?) the page says 96 bits and the exact figure is 94.6.

The labels are the page's own scale: under 40 bits is weak, 40 to 59 fair, 60 to 79 strong, 80 and up very strong. Fair starts at 7 characters (45 bits) when all four kinds are ticked, strong at 10 (64 bits) and very strong at 13 (83 bits). For lowercase letters alone the same steps come at 9, 13 and 18 characters, and for digits alone at 13, 19 and 25.

Bits describe the chance of guessing a password made by this page when the attacker knows the settings. They are not a crack time, and the figure means nothing for a password you invented yourself.

Passphrases

A passphrase is words chosen at random from a list. This page uses the EFF large wordlist: 7,776 unique words, from abacus to zoom, licensed CC BY 3.0 US. Each word adds log2(7776) = 12.92 bits, so the strength depends only on how many words you pick. The EFF, which published the list, suggests six words for most uses.

By the page's scale six words read "strong" and seven read "very strong". We made 100,000 word draws and all 7,776 words appeared; the chi-square sat 0.68 standard deviations from the value a uniform draw gives.

The separator can be up to five characters (we tried 12345), and Capitalize each word is a checkbox. If a site demands a digit or a symbol, a separator such as 9! supplies one. It adds nothing to the strength figure, which counts only the words.

The word list is a 77,697-byte file from this site. The page fetches it once, the first time you choose Passphrase, and not again when you switch back and forth. If it cannot be loaded, the page says so.

Length counts for more than kinds

Twenty lowercase letters give 94 bits. Twelve characters of all four kinds give 77. Sixteen characters without symbols give 95, which helps when a site rejects symbols. Leaving out the look-alike characters (I, l, 1, O, 0, o) cuts the pool from 87 to 81 and the default from 103 to 101 bits, a small price if you will type the password by hand. If a site allows long passwords, take the length first and the extra kinds second.

Things the page does that can surprise you

These came up in testing. We did not change them.

What is stored and what leaves the page

In our network test the page made two requests to other hosts, the ad script and the Google tag, which load on every GramFile page, and one request to this site for the word list when Passphrase was first chosen. No request had a body. We generated 50 passwords and passphrases and none of the values appeared in any request. After generating and copying, localStorage, sessionStorage, cookies, IndexedDB and the cache storage were all empty, and a reload gave a new password with the settings back at their defaults. The text copied to the clipboard matched the three passwords on screen.

We cannot see what browser extensions on your machine do with a page, and anything you copy stays on the clipboard until something replaces it.

Where to keep it

A password you cannot remember belongs in a password manager, and each account needs its own. This page saves nothing, so paste the result straight into the manager. We did not test the generators built into browsers or managers.

A UUID from the UUID generator is an identifier, so do not use one as a password. To check a downloaded installer before you trust it, use the file hash checker.

Measured results

Test runs of the page in headless Chromium 157. Strength figures were compared with an exact count of the passwords that contain every ticked kind.
Setting or testWhat we ranWhat came out
Default: 16 characters, all four kindsRead the strength line103 bits, pool 87, very strong; exact count 102.85 bits
12 characters, all four kindsRead the strength line77 bits, strong; exact 76.86
4 characters, all four kindsRead the strength line25 bits, weak; exact 21.95
20 lowercase lettersRead the strength line94 bits, very strong
16 characters, no symbolsRead the strength line95 bits, pool 62
16 characters, look-alikes left outRead the strength line101 bits, pool 81
6 and 7 wordsRead the strength line77 bits strong, 90 bits very strong
102,400 digits drawnChi-square, 9 degrees of freedom8.39, limit 21.67
100,000 words drawnChi-square, 7,775 degrees of freedomAll 7,776 words seen, 0.68 standard deviations
1,000 passwords of 6 and 1,000 of 4, all four kindsCheck each kind is presentEvery password had all four
Length 4 and 128, count 20GenerateWorked; length 3 and 129 and count 21 show a message
After generating, copying and reloadingCheck browser storagelocalStorage, sessionStorage, cookies, IndexedDB, caches: all empty
50 generated valuesNetwork test2 outside requests, 1 word list request, 0 bodies, 0 values in any request

Prefer desktop software?

A password manager can create and save a password in one step, which this page cannot. Use the page when the password is not going into a vault, such as a Wi-Fi key you will type or a passphrase you want to memorize. We did not test any desktop or browser generator.

Frequently asked questions

Is it safe to make a password on a website?

The page makes it with your browser's own random number generator, and the only request its code makes is for the word list in passphrase mode. In our test none of 50 generated values appeared in any request. We cannot see what extensions in your browser do, so keep those to ones you trust.

Are my passwords stored or sent?

No. After generating and copying, all five browser stores were empty and the requests carried no body. The only requests were the ad script, the Google tag and, in passphrase mode, one request for the word list.

How long should a password be?

On the page's scale, 13 characters with all four kinds reach 83 bits, which it calls very strong. With lowercase letters alone you need 18 characters. For a passphrase, seven words give 90 bits. If a site allows more, use more.

Password or passphrase?

Both are random. A passphrase of six words (77 bits) is easier to type and to remember. A password of 16 characters with all four kinds (103 bits) fits sites that insist on symbols. If it goes into a password manager, either one is fine.

What does the strength figure mean?

It is the length times log2 of the pool, rounded down. A figure of 103 bits means the page could have made 2 to the power of 103 different passwords with those settings. It is not a crack time. The real figure is a little lower when every kind is required, by 0.24 bit at 16 characters.

Why does my password have no symbol?

Either Symbols is unticked, or the box "Symbols to use" holds only spaces or letters, which the page drops without a message. Look at the pool in the strength line: 62 means no symbols were used. An empty box restores the default 25.

Can I make several at once?

Yes, up to 20. Copy puts all of them on the clipboard, one per line.

Does it rate a password I already use?

No. The strength figure applies only to passwords made by this page.

Where does the word list come from?

It is the EFF large wordlist of 7,776 words, licensed CC BY 3.0 US. The page loads it from this site the first time you choose Passphrase.