Password Generator
Strong random passwords, created in your browser. This tool does not send or store them.
How to generate a password
- A password appears as soon as the page loads. Press Generate new for another one. Any change to the options also creates a fresh password automatically.
- Drag the Length slider, which runs from 8 to 64 characters. The default is 16.
- Tick the character types you want: lowercase a-z, uppercase A-Z, digits 0-9 and symbols. If a site refuses symbols, untick that box.
- Switch on Avoid look-alikes if you will ever read the password aloud or type it from a printout.
- Press Copy and paste it straight into your password manager or the site's form. The button says "Copied" for a moment to confirm.
If you untick every box the page shows "Select at least one type" instead of a password.
In short
Characters are drawn with your browser's secure random generator, and each ticked type is guaranteed at least once. The entropy figure estimates how many passwords the length and character pool allow; longer passwords add far more strength than extra character types.
Frequently asked questions
Is this safe to use?
Passwords are made locally with your browser's cryptographically secure random number generator (crypto.getRandomValues). This tool does not transmit or save them.
How is the strength estimated?
We show entropy in bits: length times the base-2 log of the character set size. Over 80 bits is strong; over 100 is excellent.
Why does the same length sometimes give different strength ratings?
Strength depends on the size of the pool as well as the length. Sixteen lowercase letters give about 75 bits, while sixteen characters drawn from all four types give about 103. Ticking more types or adding length both raise the figure.
Can two people ever get the same password?
In theory yes, in practice no. A 16-character password from an 85-character pool has about 10 to the power of 30 possible values, so a repeat by chance is not a realistic concern.
Our test: does every character turn up equally often?
Generate new was pressed 100,000 times at each of three lengths (8, 16 and 32 characters), with all four character types ticked and look-alikes allowed, in headless Chromium 153.0.8010.12. We counted every character in the 300,000 passwords (5.6 million characters in total) and averaged the count per character within each type.
| Length | Each lowercase letter | Each uppercase letter | Each digit | Each symbol | Digit vs lowercase |
|---|---|---|---|---|---|
| 8 characters | 8,548 | 8,540 | 14,713 | 9,069 | 1.72 x |
| 16 characters | 17,976 | 17,945 | 24,142 | 18,462 | 1.34 x |
| 32 characters | 36,756 | 36,787 | 42,981 | 37,307 | 1.17 x |
Every one of the 300,000 passwords had the requested length and contained at least one lowercase letter, uppercase letter, digit and symbol. Within each type the spread was narrow: at 16 characters the ten digits each appeared between 23,958 and 24,304 times.
What it means: characters are even within a type, but digits turn up more often than letters, because one guaranteed position is filled from only ten digits. At 16 characters digits made up 15.1% of all characters rather than the 11.8% their share of the pool would suggest. It comes from always meeting "must contain a digit" rules, and it shrinks as the password gets longer.
Our test: how close is the entropy figure to the number of passwords it can make?
The figure under the password is length times log2 of the pool size. Because every password must contain each ticked type, some strings from that pool can never appear: at 8 characters, a string like "abcdefgh" is impossible with all four types ticked. We read the figure from the screen at seven lengths (five are in the table below; all seven are in the CSV), with and without Avoid look-alikes, in headless Chromium 157.0.8103.78. Then we counted exactly how many strings of that length contain every ticked type (inclusion-exclusion over the four types; pool of 85 characters, or 80 with look-alikes removed).
| Length | Shown on screen | log2 of passwords it can make | Share of random pool strings with every type |
|---|---|---|---|
| 8 characters | 51 | 50.25 | 49.1% |
| 12 characters | 77 | 76.47 | 73.5% |
| 16 characters | 103 | 102.32 | 85.3% |
| 20 characters | 128 | 128.06 | 91.5% |
| 32 characters | 205 | 205.07 | 98.2% |
The last column is the chance that a string drawn at random from the whole pool happens to contain all four types; only those strings can come out of the generator.
With Avoid look-alikes ticked the screen showed 51, 76, 101, 126 and 202 bits at the same lengths; the exact counts were 49.42, 75.31, 100.84, 126.25 and 202.25 bits.
The figure on screen was furthest above the exact count at 8 characters with look-alikes removed: 51 shown against 49.42, a difference of 1.58 bits, so there it overstates the number of possible passwords about three times. About 1.16 bits of that (roughly 2.2 times) comes from the formula itself, since 8 × log2(80) is 50.58 before rounding; the remaining 0.42 bits comes from rounding to a whole number. The CSV gives both differences.
At 16 characters the screen was 0.68 bits above the exact count with all characters allowed and 0.16 bits above with look-alikes removed. At 20 and 32 characters the exact count was slightly above the whole number shown (for example 128.06 against 128). Part of every difference is the rounding to a whole number, which on its own can move the figure by up to half a bit.
We also pressed Generate new 2,500 times at 8 characters for each of four type combinations (all four; letters and digits; lowercase, digits and symbols; uppercase and digits). All 10,000 passwords were 8 characters long and none was missing a ticked type. The exact count is an upper limit on entropy: the generator does not pick evenly among all those strings (see the digit-share test above), so treat the figure as a close guide rather than a precise measure.
A side check on the number box next to the length slider: it rounds and limits what you type. Typing 7 gave 8, 65 gave 64, 12.6 gave 13, 12.4 gave 12, -5 gave 8 and 1e2 gave 64. Typing 0, or clearing the box, put it back to the default of 16.
The readings are in four CSV files with header rows: shown figure versus exact count, text on screen, 8-character runs and Length box values.
More details
What makes a password strong?
Length matters most. Each extra character multiplies the number of guesses an attacker needs. A random 16-character password using letters, numbers and symbols is far beyond brute-force reach today. Use a different password for every account and keep them in a password manager.
Tips
- Prefer 16 characters or more for important accounts.
- Turn on two-factor authentication where it is offered.
- Never reuse a password across sites.
How the password is built
The generator never uses Math.random. Every choice comes from crypto.getRandomValues, the browser's cryptographically secure source of random numbers. It also avoids a subtle bias: when you map a random 32-bit number onto a list of, say, 85 characters with a simple remainder, the first few characters come up slightly more often. This tool throws away any random number that falls in the uneven leftover range and draws again, so on every random draw each character in the pool is exactly equally likely.
The steps are: put together the pool from the ticked types, pick one character from each ticked type so that the result always contains every kind you asked for, fill the remaining positions from the whole pool, then shuffle all positions with a Fisher-Yates shuffle. The shuffle matters, because otherwise the guaranteed characters would always sit at the start.
The symbol set is exactly 23 characters: ! @ # $ % ^ & * ( ) - _ = + [ ] { } ; : , . ?. Quote marks, slashes and angle brackets are left out on purpose, since they often cause trouble inside forms, shells and URLs.
Reading the entropy figure
Under the password you see something like "About 103 bits of entropy - excellent". The page computes it as length multiplied by log base 2 of the pool size, then rounds. A few worked examples:
- 16 characters from all four types (85 characters in the pool): 16 x 6.41 = about 103 bits, rated excellent.
- 12 characters from all four types: about 77 bits, rated fair.
- 16 lowercase letters only (26 in the pool): about 75 bits, rated fair.
- 16 letters and digits without symbols (36 in the pool if you tick only a-z and 0-9): about 83 bits, rated strong.
- 8 characters from all four types: about 51 bits, rated weak.
The labels are fixed thresholds: 100 bits and above is excellent, 80 and above strong, 60 and above fair, anything lower weak. Each extra bit doubles the number of guesses an attacker needs, so 103 bits is not slightly better than 77 bits, it is about 67 million times harder to guess. The figure is a close estimate rather than an exact measure, because forcing one character of each type reduces the number of possible results, most noticeably in short passwords.
When to use what
- Accounts kept in a password manager: use 20 or more characters with every type ticked. You never have to remember it, so there is no reason to make it short.
- A password you must type by hand, such as a Wi-Fi key for a guest or a TV login: turn on Avoid look-alikes, drop the symbols and go longer, for example 20 letters and digits.
- Sites with odd rules: some old systems cap the length at 12 or 16 characters or ban certain symbols. Match the limit, tick only what is allowed, and keep the length at the maximum.
- Master passwords that you do have to memorise are a poor fit for a random string of characters. A long passphrase of several unrelated words is easier to remember.
Copying, storing and reusing generated passwords
- The Avoid look-alikes option removes 0, O, l, 1 and I from the pool. That shrinks it slightly (from 85 to 80 characters with everything ticked), costing about 1.4 bits at 16 characters (the rounded figure on screen drops from 103 to 101).
- The page does not save, log or send the password. Closing or reloading the tab discards it, so copy it before you leave.
- Pasting a password into a plain notes app or a chat leaves a copy behind. Put it in the account form or a password manager and clear the clipboard afterwards if your device allows.
- A strong password cannot protect against phishing or a site that stores passwords badly. Use a unique password for every account and turn on two-factor authentication wherever it is available.