Password Generator

You need a password. There is one waiting for you below, made a moment ago on your own computer, and you can take it and go.

If you are wary of typing a password into a website, good, and do not worry, that instinct is correct. It is the reason this page works the way it does. Nothing here is sent anywhere, there is no server involved at any point, and you can prove that for yourself in about thirty seconds. I will show you how further down.

These are rough orders of magnitude, not promises. Which one applies to you depends entirely on how the website stored your password, and there is no way for you to find that out.

Made in your browser using its own secure random number generator. Nothing is sent anywhere and nothing is stored, including by me.

Three things most password generators get wrong

A password generator looks like a simple thing. Pick some random characters, show them. There are three places that quietly goes wrong, and two of them you would never notice.

1. Where the randomness comes from

Browsers have two ways of producing random numbers. One is meant for shuffling a list or moving something on screen. The other is built to be unpredictable on purpose.

The everyday one is not unpredictable. Watch enough of its output and you can work out its internal state, and once you have that you can work out every number it has produced and every number it will produce next. That is fine for a card game. For a password it is the whole game lost.

Plenty of generators use the everyday one, because it is one word shorter to type. This page uses the cryptographic one, and if your browser does not have it, this page refuses to make you a password at all rather than quietly falling back and saying nothing. A password you wrongly believe is strong is worse than no password, because you will reuse it.

2. A bias that survives even a good random source

This one is genuinely subtle and it catches out people who ought to know better.

You have a random number from 0 to 255 and you want a letter from an alphabet of 62. The obvious move is to divide by 62 and take the remainder. It works, and it is not fair.

Think of it like cutting a 256 page book into 62 equal chapters. It does not divide evenly. You get 62 chapters of four pages and eight pages left over, and those eight get bolted onto the first eight chapters. So the first eight characters of your alphabet turn up about a quarter more often than the rest.

Not fatal. Not nothing either, and completely avoidable. This page throws away any draw that lands in the leftover part and takes another one. That gives an exactly even chance to every character.

Where it stops. This is a small effect and it will not be the reason anybody loses an account. It is here because it is free to do properly and because a tool that cuts the corner you cannot see is probably cutting others you also cannot see.

3. The coloured strength bar is a guess

Those green and red bars are for passwords somebody typed in. The tool cannot know how the password was chosen, so it guesses: counts the letter types, looks for dictionary words, and scores it.

For a password this page made, guessing is unnecessary. We know exactly how it was chosen, so the number of possible passwords is plain arithmetic: the size of the alphabet multiplied by itself once for every character. Sixteen characters from a pool of 88 gives about a hundred bits, and that is a fact, not an opinion.

So the page shows the real figure in bits and works everything else out from it.

Where it stops, and this matters. Bits describe how the password was made, nothing else. The moment you write it on a note by the monitor, or reuse it on a second site, or paste it into something that keeps a copy, the number stops meaning anything. It measures one risk out of several.

Why there are three crack times and not one

Every site that tells you a password would take three million years to crack is leaving out the part that decides the answer.

How fast somebody can guess depends almost entirely on how the website stored your password in the first place, and that is a decision made by their developers years ago that you will never be told about.

  • Guessing through the login form. The site limits attempts, so perhaps a hundred guesses a second. This is the only situation where you have any protection at all, and it comes from them rather than from you.
  • Their database was stolen, and they stored it properly. Modern storage is deliberately slow to check. A determined attacker manages perhaps twenty thousand guesses a second.
  • Their database was stolen, and they stored it badly. With an old fast method, a rack of graphics cards gets through something like a hundred billion guesses a second. That is five million times faster than the case above, for the very same password.

A password that would survive for centuries in one of those falls in an afternoon in another. Nothing about the password changed. So this page shows you all three, and the honest answer to “how long would mine take” is that it depends on somebody else’s decision and you cannot look it up.

Where it stops. Those speeds are rough orders of magnitude taken from what current hardware manages, and hardware gets faster. Treat them as a way of comparing lengths against each other rather than as a prediction. The useful lesson is the shape: adding characters moves you up far faster than adding symbols does.

Words you can say, instead of characters you cannot

Switch the tool to word mode and you get something like bottom-classic-drag-later-smart.

This is not a compromise. Five words drawn from a list of 1,024 is exactly fifty bits, which is stronger than most passwords people actually pick, and you can read it down a phone line to somebody or type it on a television remote without losing your mind.

The strength comes from the size of the list and the number of words, and nothing else. A list of 1,024 gives exactly ten bits per word, because 1,024 is two multiplied by itself ten times. That is why the list is that size: it makes the arithmetic exact rather than rounded.

Words that sound alike were taken out on purpose. There is no their and there, no week and weak, because a passphrase gets read aloud and typed back in, and a word you cannot spell from hearing it is a word you will eventually lose.

Where it stops. It being a public list is not a weakness, and this catches people out. The attacker is assumed to know the list. The strength is in which words came up, not in the list being secret. What would be a weakness is picking the words yourself, because people do not pick randomly.

The other real limit is that some sites will not accept a long password, and a few still refuse spaces. If yours does, that is their fault and you will have to use character mode.

The two settings that do less than you think

No lookalikes removes the characters people confuse on a screen or a handwritten note: capital I and lowercase l and the digit 1, capital O and zero, and a few more. Genuinely useful if you have to read the password out or copy it by hand. It does cost you a little strength, because there are fewer characters to draw from, and the bits shown update to reflect that.

One of each kind forces at least one lowercase, one capital, one digit and one symbol. Almost everybody assumes this makes a password stronger.

It makes it very slightly weaker. Insisting on a rule rules some combinations out, and fewer possible passwords means fewer for an attacker to search. The effect is tiny, well under a single bit, and it is worth switching on anyway because plenty of websites demand it. But the bits shown go down, not up, and that is correct.

Length is the setting that actually matters. Every character you add multiplies the work an attacker has to do.

Frequently asked questions

Is my password sent anywhere, or stored?

No, and you should not take my word for it. Check it in about thirty seconds.

Open your browser’s developer tools, go to the Network tab, and press Another a few times. Nothing is sent. Better still, disconnect from the internet completely and keep pressing it. It carries on working, because everything happens on your machine.

Nothing is saved either. Reload the page and the password is gone for good, including from me. There is nowhere for it to have gone.

How long should a password be?

For anything you care about, aim for around eighty bits and read the three crack times rather than following a rule. That is roughly sixteen random characters, or six words.

For your email account, which can reset every other password you own, go further. Twenty or more characters costs you nothing if a password manager is typing it.

Should I change my passwords regularly?

No, and the official advice reversed on this some years ago. Forcing regular changes makes people pick worse passwords, because they end up cycling through small variations of one they can remember.

Change a password when you have a reason: a site was breached, you reused it somewhere, or you shared it with somebody. Otherwise a strong unique password can stay as it is.

What about the password manager, is that safe?

Far safer than the alternative, which is reusing a handful of passwords everywhere. Reuse is the thing that actually loses accounts: one site gets breached and the same password is tried on your email within hours.

A manager means every password can be long, random and different, and you only have to remember the one that opens it. Make that one a passphrase from the word mode above.

I need to hash a password for WordPress, not generate one

Different job, and there is a separate page for it: the WordPress password hash generator takes a password you already have and produces the value WordPress stores in its database.

If you have any issues, you can ask me via comment, and I will love to help you out.