Password Generator
Generate a strong password from your browser’s cryptographic randomness. Nothing is sent anywhere.
Between 8 and 128 characters.
Leaves out 0 O o 1 l I |
A password appears here as soon as the page loads in your browser.
Where the randomness comes from
A password is only as strong as the randomness behind it, and this is the part almost no generator says plainly. This one is made with crypto.getRandomValues — the browser's cryptographic generator, the same one a password manager relies on. Math.random is the alternative, and it is seeded, predictable, and never intended for anything a person depends on. The two look identical in the output: there is no way to tell from a password itself which source made it, which is exactly why this page says so rather than leaving it to be assumed. There is no fallback — if crypto.getRandomValues is unavailable, nothing is generated and the page says why, rather than quietly handing you a weaker password that looks the same as a strong one.
Picking a character without a thumb on the scale
The obvious way to turn a random byte (0–255) into a character is alphabet[byte % alphabet.length], and it is wrong whenever 256 is not an exact multiple of the alphabet size. With every character type switched on, this tool's alphabet is 94 characters: 256 = 2 × 94 + 68. The naive mapping keeps every byte, so the alphabet's first 68 characters get a third turn — from bytes 188 through 255 wrapping back round — while the remaining 26 only ever get two turns in every 256 raw bytes. That is a real skew, present in every password made that way, and invisible to anyone reading the result.
This tool uses rejection sampling instead: any byte at or above 188 (the largest multiple of 94 that fits under 256) is thrown away and another is drawn, so all 94 characters end up with exactly equal probability rather than approximately equal. Not every choice needs the fix — pick symbols on their own and the alphabet is 32 characters, and 256 divides by 32 exactly, so nothing is ever discarded — but the tool works out the cutoff for whichever alphabet your choices actually produce, every time.
Making sure every class you asked for actually shows up
If you ask for symbols, a password with no symbol in it breaks the promise you made when you checked the box — but the common fixes cause their own problems. Placing one character of each requested class in a fixed slot leaks structure to anyone who looks at enough passwords, and shuffling the result afterwards reintroduces exactly the kind of bias the previous section just removed, unless the shuffle itself is proven unbiased. This tool draws a whole password uniformly at random and checks it: if a requested class is missing, the draw is thrown away and a new one is made. The result is uniform over exactly the set of passwords that satisfy what you asked for, which is the honest way to keep the promise.
Bits, not adjectives
The number beside the password is its entropy: the size of the set it was drawn from, written as a whole number of bits. That set is every password of that length from that alphabet that contains each type you asked for — the draws missing one are thrown away, so they are not counted. With every character type on, this page's default — 20 characters from a 94-character alphabet — is 130 bits: log2(94) × 20 is 131.1, and about one draw in nine lacks a required type. That is not a label like "strong"; it is the actual size of the space, and the length and the alphabet it comes from are shown beside it.
Past a fairly low point, more length stops buying anything real. Twenty letters and digits — a 62-character alphabet — is already about 119 bits (log2(62) × 20 ≈ 119.1) — not brute-forceable by anyone, with any hardware that exists or is ever likely to exist. Stretching to forty characters would produce roughly double the bit count on paper, but not double the protection, because 119 bits was never the weak point in the first place. What actually endangers a password past that threshold is using it on more than one site, or typing it into a page that only looks like the right one — and no amount of extra length helps with either.
Words, when it has to be typed from memory
Some secrets never go into a password manager, because they are what unlocks it: a disk-encryption key typed at boot, a login on a machine that has nothing on it yet, the manager's own master password. K7#vQ2mL@9xF is the wrong shape of answer for those. Switch to Passphrase and the tool draws whole words instead.
Six words from the EFF list of 7,776 is 77 bits — about what twelve random characters give you, and far easier to type twice without a mistake. Each word is worth log₂(7,776), or 12.9 bits, so the word count is the only control on that side of the page that changes what the passphrase is worth. The separator and the capitals do not, and the page says so beside them.
The list is public, and that is the point. What a search has to get through is the number of ways six words can be drawn from 7,776 — around 2×10²³ — not an attacker's ignorance of which words are on it. Assume they downloaded the same file; the figure is unchanged. The dangerous passphrase is the one somebody made up, because the words were never uniform and the grammar narrows every word after the first.
The list weighs about 24 KB compressed, so it is fetched only when you ask for a passphrase. Come here for a character password and you never download it.
Why there is no strength meter
Strength meters work by pattern-matching: dictionary words, keyboard walks, repeated characters, a year tacked on the end. Those are useful heuristics for a password a person made up. They are meaningless here, because a password drawn uniformly at random was never at risk of forming a pattern in the first place — the only fact that describes it is the size of the space it came from, and that number is already on the page as entropy. A meter would only imply the tool knows something about the password that it does not, so there is not one.
Why the character-type checkboxes are here at all
Turning off a class shrinks the alphabet and lowers the entropy: twenty lowercase letters is 94 bits against 130 with all four types. That is a real difference, and length buys it back — 28 lowercase letters is 131 bits — while a random password has no pattern for a missing class to expose. The checkboxes exist because plenty of signup forms still insist on a digit or a symbol, not because a random draw needs every class to be safe. Forcing a symbol into every password, and rotating one on a fixed schedule, are the two pieces of guidance most people still carry from a decade ago, and current practice has moved away from both: they were meant for a password a human was inventing under pressure, and in practice both pushed people toward the same few predictable patterns — a substituted symbol, a number incremented at the end. Neither applies to a password this tool draws at random, so the boxes are here for the sites that still ask, not because checking one makes the result safer.
The clipboard, and one honest caveat
Copying is offered because retyping a random password by hand is its own source of error. The caveat is real rather than a formality: on most systems, the clipboard can be read by any other application running on the device, not only the one you paste into. It is worth clearing it — copying something else is enough — once the password has landed where it belongs.
Nothing is sent
This is a static page with no server behind it, so there is structurally nowhere for a password to go — not a policy choice that could be reversed, a fact about how the page is built. The password itself is made inside your browser a moment after the page finishes loading, never while the page is being built, because a value computed at build time would be baked into the page and handed to every visitor identically — the one failure this tool exists to prevent. Load the page twice and the two passwords differ, and neither ever appears in the page's own HTML. Needing an identifier that must not collide, rather than a secret to type into a login form, is a different job — that is the UUID Generator.
Questions
How strong is the password this makes?
Strength is stated as entropy, in bits — the number beside the password. It is the size of the set the password was drawn from: every password of that length from that alphabet that contains each type you chose, counted exactly and written as bits. With every character type on, the default 20-character password draws from a 94-character alphabet, which is 130 bits. That number is the whole answer to "how strong": there is nothing softer, like "good" or "excellent", behind it.
Why does this use crypto.getRandomValues instead of Math.random?
Math.random is seeded and predictable — on some engines its internal state can be recovered from a handful of outputs — and it has never been suitable for anything a person relies on. crypto.getRandomValues is the browser’s cryptographic generator, the same source a password manager uses. A password made the weak way looks identical to one made the strong way; you cannot tell by reading the output, only by knowing which source made it. This tool never reaches for Math.random, and if crypto.getRandomValues is unavailable it refuses outright rather than falling back.
What is modulo bias, and does this tool have it?
It is the skew you get from mapping a random byte (0–255) onto an alphabet by taking byte % alphabet.length, when 256 is not a multiple of that alphabet size. With every character type on, this tool’s alphabet is 94 characters: 256 = 2 × 94 + 68, so the naive mapping would make the alphabet’s first 68 characters land three times in every 256 raw bytes while the remaining 26 land only twice — the first 68 are 50% more likely, in every password, forever, and no reader could see it. This tool discards any byte at or above 188 (2 × 94) and draws again, so every character ends up with exactly equal probability instead of approximately equal. Some choices need no fix at all: pick symbols alone and the alphabet is 32 characters, and 256 divides by 32 exactly, so no byte is ever discarded.
What is a passphrase, and when should I use one instead?
A passphrase is several words drawn at random from a published list — six words from the EFF list of 7,776 is 77 bits, about what a 12-character random password gives you. Use one for the handful of secrets you have to type from memory: a disk-encryption key, a machine with no password manager on it yet, the master password of the manager itself. For everything a password manager stores, the character password is the better answer.
Does it matter that the word list is public?
No, and it is public on purpose. The strength is in how many ways six words can be drawn from 7,776 — about 200 thousand million million million — not in an attacker not knowing which words are on the list. Assume they have the list; the number stays the same. A phrase you made up yourself is the weak one, because the words were not chosen uniformly and the grammar narrows what comes next.
Does capitalising the words make the passphrase stronger?
No. Capitalising every word is a fixed rule, so there are exactly as many passphrases after it as before — the figure on the page does not move, and it should not. The option is there for a password field that insists on a capital letter, not to make the passphrase harder to guess. The same goes for which character sits between the words.
Is a longer password always safer?
Not past a fairly low ceiling. Twenty letters and digits — a 62-character alphabet — is already about 119 bits (log2(62) × 20 ≈ 119.1) — not brute-forceable by anyone, with any hardware that exists or is ever likely to. Doubling the length to 40 roughly doubles the bit count on paper, but it does not double your real protection, because 119 bits was never the weak point to begin with. Past that point, what actually puts a password at risk is reusing it somewhere else, or typing it into a page that only looks like the real one — and a longer password helps with neither.
Why is there no strength meter?
Meters work by pattern-matching: dictionary words, keyboard walks like "qwerty", repeated runs, a birth year at the end. Those are sensible things to flag in a password a person invented. They mean nothing for a password drawn uniformly at random, where every character was equally likely and no pattern was ever at risk of forming — the only fact that matters is the size of the space it came from, and that number is already on the page as entropy. A meter here would be theatre implying the tool knows something about the password that it does not.
Do I need to turn on every character type?
Only if the site you are using demands it. The checkboxes exist because plenty of forms still insist on a digit or a symbol, not because a random password needs every class to be safe. Turning a class off shrinks the alphabet and lowers the entropy — twenty lowercase letters is 94 bits against 130 with all four types — but length buys the same thing back: 28 lowercase letters is 131 bits. And a random password has no pattern for a missing symbol to expose. What forcing a symbol actually did, historically, was push people who were choosing their own passwords toward the same few predictable substitutions — a problem for human-chosen passwords, not for one drawn at random here. Leave on whichever types the site requires, and add length if you turn one off.
Should I still change this password every 90 days?
No. Mandatory rotation on a fixed schedule is the other piece of decade-old advice most people still carry, and it was abandoned for the same reason forced symbols were: it pushes people toward predictable patterns, typically incrementing a number or a season name at the end of whatever they used last time. A password drawn at random from a large enough alphabet does not get weaker by sitting still. Change it when you have a specific reason to — a breach at that site, or having reused it somewhere you shouldn’t have — not on a calendar.
Is anything about this password ever sent anywhere?
No, and not just as a promise. This page is static, with no server behind it, so there is nowhere for the password to go. It is generated inside your browser in a moment after the page finishes loading — never while the page itself is being built — specifically so that no password is ever computed once and served identically to every visitor. Load the page twice and you get two different passwords; the value never appears in the page’s own HTML.
Is it safe to paste this from the clipboard?
Yes, but the clipboard itself is not a vault: on most systems, any other application running on your device can read what you last copied. It is worth pasting the password where it belongs and then clearing the clipboard — copying something else, for instance — once you are done.
Related WGX tools
- Random Number Generator
Draw a number, or several without repeats, from your browser’s cryptographic randomness rather than a source anyone can anticipate.
- UUID Generator
Generate version 4 or version 7 UUIDs from your browser’s cryptographic randomness.
- Random Picker
Pick winners from a list — and, if the result has to convince other people, from a seed you publish first so anyone can re-run the draw.