Every dayRandom Generators

Random Password
generator.

Strong random passwords and passphrases, made in your browser, never saved.

How it's worked out

Each character is picked on its own from the characters you allow. The random values come from crypto.getRandomValues, your browser's cryptographic generator, and a rejection step keeps every character equally likely. With all four types there are 94 characters to choose from at every position.

Strength is measured as entropy, in bits. Each bit doubles the number of guesses an attacker needs:

H\displaystyle H=L×log2⁡N\displaystyle {}= L \times \log_2 N

Here LL is the length and NN is how many characters are allowed. For 20 characters from 94, that is 20 × 6.555 = 131.09 bits. The figure is exact because the password really is random. It says nothing about passwords people make up, which follow patterns.

Include every type needs one more step. The tool does not force a symbol into a fixed slot. It makes whole passwords and throws away any that miss a type, so every password that passes is equally likely. That leaves fewer possible passwords, and the tool counts them with the inclusion-exclusion rule: start from all NLN^L, take away those missing each type, add back those missing two, and so on. At 20 characters, 89.1% of passwords pass, which costs 0.17 bits. At 8 characters only 46.1% pass, so 52.44 bits becomes 51.32.

A passphrase works the same way with words. This tool picks from 389 words, which is 8.60 bits per word. Capital letters add nothing, because every word gets one. A digit on a random word adds log2⁡(10×words)\log_2(10 \times \text{words}) bits.

The time to guess is half of all possibilities (the average) divided by a guessing rate. The rates are hashcat's benchmark for one RTX 4090 graphics card: 163.4 billion guesses a second against MD5, a fast hash, and 212,600 a second against bcrypt at cost 5, a slow one.

The page is built ahead of time, and a server cannot use your browser's generator. So the password shown before the page finishes loading is an example from a seeded generator (mulberry32, seed 1). It is labelled as an example and is the same for everyone, so never use it. Your browser replaces it with a fresh password as the page loads. Nothing is saved: no settings, no list of earlier passwords, and no link that holds a password. The example links below carry settings only.

Worked examples

A new shopping account

Priya is signing up to a store and will keep the password in her password manager. She picks 16 characters with all four types. That gives 104.59 bits, Very strong. An attacker who stole the store's database would need about 3.0 trillion years on one RTX 4090 if it used MD5, and far longer if it used bcrypt.

Open this example in the tool

A bank site that refuses symbols

Marcus's bank only accepts letters and digits. With symbols off, 16 characters still give 95.18 bits, because 62 characters per position is plenty. To pass 80 bits with letters and digits, 14 characters is the shortest length. Length makes up for the missing symbols.

Open this example in the tool

A master passphrase you have to remember

Sam needs one password to open a password manager, typed by hand every day. Eight words from this tool's list give 68.83 bits, and adding a digit gives 75.15. To pass 80 bits takes 10 words from this list, or 7 from the EFF long list of 7,776 words. Password managers also slow guessing down on purpose, which adds a lot of safety on top.

Open this example in the tool

Reading your result

The gauge uses four bands: Weak under 40 bits, Fair from 40, Strong from 60 and Very strong from 80. They are this site's bands, set by guessing time. At the MD5 rate above, a 60-bit password lasts about 41 days on average and an 80-bit one about 117,223 years.

Those times assume the worst common case, a stolen database with a fast hash. Signing in on a website is much harder to attack. NIST SP 800-63B-4 tells sites to stop accepting a password after at most 100 failed tries in a row, which gives even a 40-bit password odds of 1 in 1.1 × 10¹⁰.

Length rules come from the same NIST document. A password used on its own should have at least 15 characters, or 8 where a second factor such as a code or a passkey is also used. Sites should accept at least 64 characters, so a longer password may be refused.

Common mistakes

  • Choosing symbols over length. Twelve characters with all four types give 78.14 bits. Sixteen letters and digits give 95.18. Extra characters add more than extra types.
  • Editing the password by hand. Swapping a letter for one you like, or adding your birth year, adds a pattern and can lower the strength. Generate again instead.
  • Inventing your own passphrase. Words you choose yourself, like a line from a song, are far easier to guess than words picked at random. The entropy figure only holds for random words.
  • Reusing one strong password. When one site leaks, attackers try the same email and password everywhere else. Use a different password for each account and let a password manager remember them.
  • Copying the example. The password shown before the page loads is the same for every visitor. Wait for your own, or press Generate.

Questions people ask

With this tool, yes. The password is made by your browser's cryptographic generator and never leaves the page: nothing is stored, logged or sent to a server, and your settings are not kept either. Once the page has loaded it works with the internet switched off.

Sources