Password Generator

Create strong random passwords or easy to type passphrases, see their strength in bits, and copy them straight into your password manager.

Password Generator
Your new password
Entropy
0 bits
Strength
Average time to guess at 10 billion tries a second

Generated on your device. Passwords are never stored, logged or sent to Ur Next Door.

Why a generated password beats one you make up

People are predictable. We pick a word, capitalise the first letter, and add a year or an exclamation mark at the end, and password cracking software tries exactly those patterns first. A password chosen by a secure random generator has no pattern to exploit, so an attacker's only option is to try every possibility. This tool builds passwords that way, and shows you how many possibilities there are.

How to use it

  1. Choose Password for a string of random characters, or Passphrase for a row of random words that is easier to read out and type on a phone.
  2. For a password, set the length and the kinds of characters a website accepts. Leaving out look-alikes removes 0, O, o, 1, l, I and | so the password can be read aloud or copied by hand without mistakes.
  3. Press Copy and paste the result into your password manager, or straight into the sign-up form.

How the randomness works

Every character and every word is picked with crypto.getRandomValues(), the browser's cryptographically secure random number generator, never with Math.random(). Turning a random 32 bit number into a choice among, say, 83 characters is where many generators go slightly wrong: taking the remainder after dividing by 83 makes the first few characters a little more likely, because 232 does not divide evenly by 83. This tool uses rejection sampling instead. Any random number in the uneven tail at the very top of the range is thrown away and a new one is drawn, so every character has exactly the same chance. When several character types are ticked, at least one of each is included, and the positions are then shuffled with the same unbiased method.

What the entropy number means

Entropy measures how many guesses an attacker would need, written as a power of two. For a random password it is length x log2(pool size), where the pool is the number of different characters allowed. With all four types ticked and look-alikes left out, the pool has 83 characters, worth about 6.38 bits each, so a 16 character password has about 102 bits: 2102 possibilities. For a passphrase the pool is the word list. The list built into this page has 428 short, everyday words, worth about 8.74 bits each, so the default of eight words gives about 70 bits. That is why passphrases here default to eight words: a short list needs more words than the famous Diceware list of 7,776 words, which gives about 12.9 bits per word.

The strength label follows widely used bands: under 28 bits very weak, under 36 weak, under 60 fair, under 128 strong, and 128 or more very strong. The time to guess assumes an attacker who has stolen a database of fast, unsalted hashes and can test 10 billion guesses a second, and shows the average time, which is half of trying them all. A website that limits login attempts is far slower to attack, so treat the figure as a worst case.

A worked example

A 12 character password from the full 90 character pool has 12 x log2(90), about 78 bits. At 10 billion guesses a second, guessing it takes about 450,000 years on average. Shortening it to 8 digits only gives 8 x log2(10), about 27 bits, which a fast attacker gets through in well under a second.

Privacy

The page creates passwords on your device. They are not saved, not logged and not sent to Ur Next Door or anyone else, and a new one replaces the old one on screen. Use a different password for every account, and store them in a password manager rather than a notes app.

Frequently Asked Questions

Are the passwords saved or sent anywhere?
No. Each password is created by your own browser on your own device and is never stored, logged or sent to Ur Next Door. Copy it into a password manager before you leave the page.
How long should my password be?
With letters, digits and symbols, 16 characters gives about 100 bits of entropy, which is far beyond any practical attack. Use at least 12 characters for accounts that matter, and longer where the site allows it.
What does entropy in bits mean?
It is the number of possible passwords written as a power of two, worked out as length times log2 of the number of allowed characters. Every extra bit doubles the guesses an attacker needs.
Should I use a password or a passphrase?
Both are strong when they are random. A passphrase of eight random words is easier to type on a phone or read out, while a random password packs the same strength into fewer characters.
Why leave out look-alike characters?
Characters such as 0 and O, or 1, l and I, are easy to confuse when a password is read aloud or typed by hand. Leaving them out costs a little entropy, which a slightly longer password makes up.