Password Generator

Every password is drawn from your browser's cryptographic random source — the same one that generates TLS keys. Read the entropy figure, not the coloured bar: it's the honest number.

Your password

Click it to copy · C
No password
G to reroll
Entropy
Pool size
Offline crack time

Length

24

Length beats complexity. Adding a character multiplies the search space; adding a symbol only widens the alphabet.

Character sets

Good practice

  • One password per service. Reuse is how a single breach becomes twenty.
  • Store them in a manager. A vault you can't remember the master password for is a vault you'll abandon.
  • Turn on two-factor wherever it's offered — it covers you when a password leaks.
  • Longer, not weirder. A 24-character passphrase with dashes outlasts an 8-character scramble.

Crack time assumes 10 billion guesses per second — a serious offline attack against a fast hash. If a service stores passwords with bcrypt or Argon2, the real figure is far higher. If it stores them in plain text, no password length will save you, so use a unique one everywhere.

The source is the operating system, not the clock

Math.random is a deterministic generator wearing a random-looking coat. It starts from a seed — in most engines, a value derived from the time — and every number after that follows from the seed by arithmetic. Read enough output and the internal state can be reconstructed, after which every value it will ever produce is known in advance. It is a fine function for picking a background colour and the wrong one for picking a secret.

This page draws from crypto.getRandomValues, which is the browser's reference to the same source the operating system uses to seed TLS session keys. That source collects entropy from hardware events — interrupt timing, disk latency, unpredictable input — and its output is not derivable from anything previously emitted. The distinction is not about how random the numbers look; both produce a uniform-looking stream. It is about whether an observer holding every previous value can compute the next one. Against the system source, they cannot; the state is never exposed to them.

Why % 62 is biased

The obvious way to turn random bytes into characters is to take a byte, divide by the alphabet size, and keep the remainder. It is also wrong, and the reason is arithmetic rather than philosophy. A byte holds 256 values; an alphabet of 62 does not divide 256 evenly:

256 = 4 × 62 + 8

      byte % 62, over all 256 inputs:
        8 characters of the alphabet can be produced 5 ways
       54 characters can be produced 4 ways

        the 8 are 25% more likely than the other 54

Nothing looks wrong. The output is the right length, drawn from the right characters, and passes every eyeball test. But the distribution has a shape, and a shaped distribution is information an attacker can use — the first character is measurably more likely to be one of those eight. The fix is rejection sampling: draw a byte, and if it falls in the leftover 8 values, throw it away and draw again. Roughly three draws in a hundred are discarded, which costs nothing, and every character left has exactly the same probability as every other.

The bias is small, and small is not the same as absent. A generator with this flaw still produces passwords that take an astronomical number of guesses to break by brute force, because the search space is barely smaller than it looks. The argument against it is not that these passwords fall in an afternoon — it is that the flaw is free to remove. Rejection sampling is a four-line loop, and a tool whose whole output is a secret should not carry a known statistical defect it could have avoided.

Coverage, then a shuffle

A requirement to include at least one uppercase letter, one digit and one symbol is a constraint on the result rather than on the drawing. Fulfilling it by placing one of each in the first three positions would put a predictable character at a predictable index, which is worse than the problem it solves. What this page does instead is draw the guaranteed characters, draw the rest freely, and then shuffle the assembled string with the same unbiased source. Every position in the result is equally likely to hold any of the characters.

Constraining the output like this does reduce the entropy slightly, because you have ruled out every string that happens to contain no digit. The entropy readout beside the password accounts for the actual pool and length rather than the theoretical maximum, which is why it is the number worth reading and the coloured strength bar is only a rough translation of it.

One more character, or a wider alphabet?

Given the choice, length wins. Each additional position multiplies the search space by the size of the alphabet; widening the alphabet multiplies each position by a smaller factor. Lowercase alone is 26 characters — 4.7 bits each. Adding the 32 punctuation marks takes the pool to 94, which is 6.55 bits per character: an extra 1.85 bits. An extra lowercase character is worth 4.7, so two more characters beat every symbol you could add, and they are easier to type on a phone.

Symbols earn their place when a system demands them and you will never type the password by hand. They cost you when the password has to be read aloud, entered on a keypad, or stored by a sign-up form written before anyone thought about escaping. When the rules permit a choice, take the length.

Where a generator stops helping

Everything above is about the string, and the string is only one part of the problem. A password generated here and used on six sites is one password, and the first of those six to lose its database has handed it to whoever is holding the file. Reuse is what turns a single breach into an afternoon of account recovery, and no amount of entropy in the string defends against it.

The second limit is the page it is typed into. A random password entered on a phishing site is a random password given away deliberately, and the generator cannot see the difference. Both of these are reasons to keep a manager: it makes a unique string per site the path of least resistance, and it will refuse to fill a form on a host it has not seen before. Use this page to make the password, put it in the vault, and treat the length of the string as the part of the problem it actually is.

Reference

What each character class is actually worth

Character classCharactersAlphabet sizeBits added per character
Lowercase lettersa–z264.70
Uppercase lettersA–Z264.70
Digits0–9103.32
Symbols (ASCII punctuation)! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~325.00
Symbols a fussy system keeps! # $ % * + - . = ? @ ^ _ ~ :153.91
Printable ASCII, no spaceA–Z, a–z, 0–9 and the 32 marks above946.55
Printable ASCII, with spacethe same 94 plus the space character956.57

Every figure in the last column is log2 of the alphabet beside it. Punctuation counts 32 characters rather than 33 — the extra printable mark is the space, which gets a row of its own because systems so often trim it off the ends of a password.

The last column is per character, and it only adds up to the password's real strength when each character was drawn independently and with equal probability from the pool. The guarantee of one character from each class bends that a little, so the entropy readout beside the password is the number to trust.

Doubling the alphabet is worth one bit per character, less than people expect. Lowercase alone gives 26 characters at 4.70 bits each; adding uppercase makes 52 at 5.70, while one extra lowercase character is worth 4.70 bits — nearly five times that doubling. Digits take the pool to 62 (5.95 bits) and the 32 punctuation marks to 94 (6.55 bits), so everything printable is worth 1.85 bits per character more than lowercase alone.

Symbols are worth having when a site insists on them and you will never type the password by hand. They cost you when you read it aloud, when you type it on a phone whose symbol keypad is a screen away, and when a system drops them on save and leaves you with something shorter than the one you were shown. When the rules let you choose, take the extra characters instead.

Questions

Passwords, answered plainly

How long should a password be?

Sixteen characters is the sensible floor for anything you care about. Twenty-four is comfortable. Past about 20 characters of a mixed alphabet, the numbers stop mattering to a human attacker and start mattering only to nation-states — at which point a phishing email is a much cheaper attack than brute force.

Is this safer than a password manager?

They do different jobs. This generates one strong string; a manager remembers hundreds of them. Use this to create the password, then put it in the vault — or use the batch mode to generate a starter set.

What are the look-alike characters about?

Uppercase I, lowercase l and the digit 1 are nearly identical in most fonts. Same for O and 0. Excluding them costs you a fraction of a bit of entropy and saves a lot of "was that a one or an ell?" — worth it for anything you'll ever retype by hand.

Why does the crack-time estimate change so wildly?

Because it's exponential. Every character you add doubles the work per character in the pool, so going from 16 to 24 characters doesn't add 50% — it multiplies the search space by roughly 250,000.

Will a password with symbols break on an old system?

Sometimes, and quietly. Legacy front-ends and badly built sign-up forms strip or re-encode characters they didn't expect, so the string that gets stored is not the one that was shown to you. If you suspect a system of this, generate with symbols off and add two or three characters to the length — that covers the roughly 0.6 bits per character you gave up, and a password that works beats one that quietly doesn't.

Is it safe to paste a generated password instead of typing it?

Yes, and it's the sensible way to handle a long one — typing 24 random characters by hand is how people end up with shorter passwords. The clipboard is the part worth thinking about: on a shared or managed machine other software can read it, and some managers clear it after a set time while others leave it sitting there. Paste into the password field, save it in your manager, and clear the clipboard on a machine that isn't yours.

What if a site's maximum length is shorter than the slider allows?

Then the site's cap wins — the length slider stops at 8, so a service that allows only 6 gets 6, and no setting on this page gets around that. Use the longest string it accepts, keep it unique to that site, and lean on two-factor, because with a ceiling that low the password is no longer what protects the account. A service that caps passwords at six or eight characters is also telling you how it stores them.