Developer tool · secure random generator

Password and Passphrase Generator

Random passwords and passphrases drawn with your browser's secure random generator. Every character or word is equally likely, and the strength shown is the entropy of the choices you made. Generated values are shown in this page and nowhere else.

When a set is ticked, each password gets at least one character from it. Pool size: 86 distinct characters.

Choose your options and press Generate. Nothing is created until you do.

Very strong128.4 bits of entropy

Entropy is log2 of the number of passwords of this length over the 86-character pool that contain every ticked set. Under 40 bits is weak, 40 to 59 fair, 60 to 79 good, 80 to 127 strong, 128 or more very strong. The figure assumes an attacker knows your settings and nothing else; it says nothing about a site that stores passwords badly.

Password and Passphrase Generator

Operator: Abdulla Al Fahad. How tools are built and checked

A password manager can invent a long random password for you, but sometimes you are standing at a router login, a shared server account or a Wi-Fi guest network with no manager in reach. This page makes the same kind of secret on the spot: either a string of random characters, or a passphrase of several ordinary words joined by a separator that you can actually type on a phone.

It also tells you how much guessing the settings are worth. The figure is entropy in bits, worked out from the size of the pool you chose and the length you picked, so you can see, for example, that a 12-character lowercase-only password (about 56.4 bits) and a 5-word passphrase from this list (about 53.9 bits) land close together, and decide whether to raise the length before you copy anything.

Key features

  • Random passwords from 8 to 128 characters
  • Passphrases of 3 to 12 words with separator, capitalisation and optional trailing number
  • Editable symbol set for systems that reject certain characters
  • Option to exclude I, l, 1, O and 0
  • At least one character from every ticked set, by redrawing until the rule is met
  • Bulk output of up to 100 values with per-row copy and Copy all
  • Entropy in bits with the pool size or word-list size shown
  • Strength label with stated thresholds

Character sets, the word list and randomness

Password mode takes a length from 8 to 128 and any mix of lowercase letters, uppercase letters, digits and symbols. The symbol box is editable, so you can remove characters that a particular system rejects, such as quotes or backslashes. The look-alike option removes I, l, 1, O and 0 from every set, which helps when the password will be read aloud or copied by eye from a printed sheet.

Passphrase mode takes 3 to 12 words from a built-in list of common English words that were written for this tool (lower case, 3 to 9 letters each). You can choose the separator (up to five characters, or none), capitalise each word, and add a number from 0 to 99 at the end. You can generate 1 to 100 values per click, and Copy all puts them on separate lines.

Everything is random in the cryptographic sense: values come from crypto.getRandomValues, never Math.random. To pick one of N options the page rejects the few raw draws that would make some options slightly more likely, so every character (or word) is exactly equally likely. When you tick several character sets, the whole password is drawn uniformly and is thrown away and redrawn if any ticked set is missing, so every password that meets your rules is exactly equally likely. The page gives up with a message after 10,000 redraws, which only happens for very short lengths with a set that has a handful of characters.

How it works

For a password, the page first builds the pool: the characters of each ticked set, minus any look-alikes you excluded, with duplicates removed. It draws every position from the combined pool and keeps the result only if each ticked set appears at least once. Each pick is an unbiased draw: a 32-bit random number is accepted only if it falls below the largest multiple of the pool size, so no remainder skews the odds.

Entropy for a password is the exact log2 of how many strings meet your rules, counted by inclusion-exclusion over the ticked sets. With all four sets and the default 24 symbols the pool has 86 characters, so a 20-character password scores about 128.4 bits; the simpler length times log2(86) would give 128.5, and at length 12 the two differ by about 0.45 bits (76.7 against 77.1). For a passphrase, entropy is the word count times log2 of the list size, plus log2 of 100 (about 6.64 bits) if you add a number.

The strength label comes from fixed thresholds shown next to the number: under 40 bits is weak, 40 to 59 fair, 60 to 79 good, 80 to 127 strong, and 128 or more very strong. They are rules of thumb for guessing resistance, not a guarantee, and they assume the attacker knows how the password was made.

Typical uses

  • Setting the admin password on a new router or access point
  • Creating a shared service account password to hand to a teammate once, then rotate
  • Making a memorable disk-encryption or password-manager master passphrase
  • Generating a batch of one-time passwords for a classroom or workshop sign-up sheet
  • Producing test credentials that follow a site's rule of one upper, one digit and one symbol

Building one

  1. Pick Password or Passphrase at the top.
  2. For a password, set the length and tick the character sets; edit the symbol set if the target system limits symbols. For a passphrase, set the word count and separator.
  3. Choose how many values you want, then press Generate.
  4. Check the entropy line. If it reads Fair or Weak, raise the length or the word count and generate again.
  5. Press Copy beside the value you want and paste it into your password manager or the account form straight away.

Example

Settings

Password, length 20, lowercase + uppercase + digits + default symbols, look-alikes allowed

Result

Pool: 26 + 26 + 10 + 24 = 86 characters
Entropy: about 128.4 bits (Very strong); the simple 20 x log2(86) gives 128.5

Same pool, length 10: about 63.6 bits (Good); the simple figure is 64.3
Five-word passphrase from 1,749 words: 5 x log2(1749) = about 53.9 bits (Fair)
Eight words: about 86.2 bits (Strong)

Tips for best results

  • Length does more for entropy than extra symbol types: adding four characters to a 16-character password gains more than swapping a letter set for symbols.
  • For a secret you must type by hand on a phone, a passphrase with a hyphen separator is easier than 20 random symbols.
  • If a site rejects your password, trim the symbol set rather than shortening the password.
  • Use the exclude look-alikes option for any password someone will read from paper.
  • Store the result in a password manager as soon as you copy it, and clear the page afterwards by reloading it.

Things to check before you rely on it

Entropy describes how the value was produced, not whether it was already leaked. A strong random password reused on two sites is only as safe as the weaker site.

A password you edit by hand after generating (to make it easier to remember) is no longer random, and the entropy shown no longer applies to it.

Some sites silently cut passwords at a maximum length or ignore characters after a limit. If you cannot sign in with a long value, test the full string by pasting it into the login box and checking its length.

A five-word passphrase scores lower than a 20-character random password. That is acceptable for a login protected by rate limiting, but for an offline attack on a stolen encrypted file, add words.

The list has 1,749 words, which is small by design: common, short words are easier to remember. Each word therefore adds about 10.8 bits, not the 13 or more a large dictionary would give.

Common errors and how to fix them

"Tick at least one character set" appears and Generate does nothing.
All four sets are off, or the only ticked set ended up empty after look-alike removal. Tick lowercase, uppercase, digits or symbols, or restore the symbol set.
"Length must be a whole number from 8 to 128."
The length box holds a decimal, text or a number outside the range. Type a whole number such as 20.
"The length is shorter than the number of chosen sets."
Raise the length or untick a set. This only happens at very short lengths with several sets and is a safeguard for the one-from-each rule.
"Your browser blocked clipboard access."
Select the text in the dark box with your mouse and copy it with the keyboard, or allow clipboard access for this site in the browser's settings.

Best practices

  • Use a password manager for anything you do not have to type from memory.
  • Use a different generated password for every account.
  • Pick at least 80 bits for anything an attacker could try offline, and more for long-lived secrets.
  • Turn on a second sign-in step wherever the service offers one.

Why rejection sampling matters

The obvious way to pick a random character is to take a random 32-bit number and use the remainder after dividing by the pool size. When the pool size does not divide 2^32 evenly, the first few characters become a hair more likely than the rest. With an 86-character pool the bias is tiny, but it is real and it is easy to remove: throw away any draw at or above the largest multiple of the pool size, and draw again.

This page does that for every character and every word, and again for the whole password when a ticked set is missing. A quick check you can run mentally: a 10-character pool drawn 10,000 times should land near 1,000 per character, and a pool built from digits behaves the same way, with ordinary random scatter of a few percent and no character consistently ahead.

Reading the entropy number

Entropy in bits is the base-2 logarithm of the number of equally likely possibilities. Each added bit doubles the number of guesses an attacker would need on average. 60 bits means about 1.15 quintillion possibilities, 80 bits about 1.2 septillion. How long that takes depends entirely on how fast the attacker can test guesses, which varies enormously between an online login with lockouts and a stolen password hash tested on specialised hardware.

For that reason the labels here describe size, not time. Treat Weak and Fair as a prompt to lengthen the secret, and treat Strong as a reasonable target for most accounts protected by a slow hashing scheme.

Frequently asked questions

Where does a generated password go?

Values are made in your browser and held in the page until you reload it. The tool's code makes no network request and saves nothing to disk.

Why does the passphrase list contain only 1,749 words?

A shorter list of common words is easier to remember and spell. The entropy figure uses the real list size, so you can add words to make up the difference.

Can I use the same settings for many passwords?

Yes. Set How many to up to 100 and each value is drawn independently from the same pool.

Why does the entropy not equal length times log2 of the pool?

It does not. The page counts exactly how many strings contain every ticked set and shows the log2 of that. The simple length times log2 of the pool is slightly larger: about 0.13 bits at length 20 with four sets, and about 0.45 bits at length 12.

Should I include symbols?

Only if the service allows them and you need the extra pool size. A longer password without symbols can have the same entropy and be easier to enter.