Password Generator

Generate passwords, pronounceable passwords and PINs from the browser's cryptographic randomness, see exactly how strong they are, and check a password you already use against common passwords, words and patterns.

Overview

A password is as strong as the number of guesses it takes to find it. For a password drawn at random that number follows from two figures, how many characters are drawn and from how large a set, and is written in bits of entropy: every bit doubles the guesses. A password a person made up is weaker than its characters suggest, because attackers try common passwords, words and patterns first. This tool makes random passwords and PINs, and rates typed ones with both facts in mind.

Web interface

Choose Password or PIN. Under Password, Type chooses Random characters or Pronounceable words. Set the length, the number of words or the options, and press Generate, Ctrl/ + Enter or the circular arrow in the field. The eye shows or hides the result, the copy icon copies it. Under it are the strength bar, the entropy, the time a brute-force attack would take and the size of the character set.

To check a password you already have, type or paste it into the field: it is masked, unless you have shown it with the eye, which then stays open while you edit it. The options follow it, and a list says what weakens it. A password that is common, famous, a plain pattern or far too short is marked above that list, set apart: Don't use this password, with the reason. History, off by default, keeps the last 20 generated values in the page and forgets them on reload.

How passwords are drawn

OptionCharacters
UppercaseA to Z, 26
Lowercasea to z, 26
Numbers0 to 9, 10
Symbols!@#$%^&*()_+-=[]{}|;:,.<>?, 26
UmlautsäöüßÄÖÜ, 7
Exclude ambiguousremoves 0, O, I, l and 1
No repeated charactersdraws each character at most once
Custom exclusionsremoves any characters you list

Every character is drawn with crypto.getRandomValues, the browser's cryptographic random source. Random numbers that would favour some characters over others, as a plain modulo does, are thrown away and drawn again, so every character of the set has exactly the same chance.

The entropy of a generated password is exact: the length times log2 of the set size. The default, 16 characters from the 88 of the four main sets, is 16 × log2 88 = 103 bits. Without repeated characters it is log2 88 + log2 87 + … instead. A password may be 4 to 128 characters long.

A PIN is drawn from the ten digits, 3 to 20 of them, and can leave out zero, repeated digits and runs such as 1234 or 4321. A four-digit PIN has 13 bits: it is meant for a device that locks after a few wrong tries, not for anything that can be guessed offline, so its bar stays neutral and a note says so. Skip common PINs, on by default, draws again any PIN attackers try first: all one digit, a straight run, a repeated block such as 1212, an entry of the list of common passwords such as 2580, or a year such as 1990. That leaves out 288 of the 10,000 four-digit PINs, 2.9 %, and costs 0.04 bits.

Pronounceable passwords

Under Password, Type Pronounceable makes a password of words of three syllables, each a consonant and a vowel, with hyphens between them. One word starts with a capital letter and one ends with a digit, both drawn at random. The 16 consonants leave out c, q, w, x and y, which read differently from one language to the next; the vowels are a, e, i, o and u. That makes 80 syllables of 6.3 bits each, and Words, 3 to 6, sets the rest:

WordsEntropyExample
3, the default63 bitstobalu-Mirena-sokavi7
483 bitstobalu-mirena-Sokavi-dupeno4
5103 bitskasimu-tobalu-Mirena-sokavi-dupeno2
6122 bitsrezofi-kasimu-tobalu-mirena8-Sokavi-dupeno

The entropy shown is exact for how the password was drawn, which word got the capital letter and which the digit included. Apple's password manager makes passwords of the same kind, 20 characters in three groups with one capital letter, one digit and two hyphens, and puts them at 71 bits.

There are no symbols but the hyphens, and none are needed: strength comes from length and from drawing at random, not from the mix of characters. The current NIST guidelines, SP 800-63B-4, no longer let a service demand a mix of character types, and ask for at least 15 characters where a password is the only factor, because people meet such rules the same way every time. Where a site still asks for a symbol, the hyphens count as one.

A real word with a digit for a letter and a symbol at the end, as volum3!, is no such password: cracking tools try every dictionary word with the usual swaps first, and the check of a typed password marks it Don't use this password.

How strength is rated

EntropyRating
under 28 bitsVery Weak
28 to 35Weak
36 to 59Fair
60 to 127Strong
128 and moreVery Strong

A generated password is rated by how it was drawn. A typed password is estimated in two steps. First from its characters: 26 for lowercase, 26 for uppercase, 10 for digits, 32 for other symbols and 7 for umlauts, reduced for identical characters, runs, repetitions and keyboard rows. Then it is compared against common passwords, dictionary words, names, dates and keyboard patterns. When it matches any of those, that estimate counts and its warning is shown. When it matches nothing, the estimate from the characters stays.

TypedRating
Password123!15 bits, Very Weak: This is similar to a commonly used password
Tr0ub4dor&30 bits, Very Weak: the bad example of xkcd 936, and so famous that every cracking list tries it first
correct horse battery staple0 bits, Very Weak: the good example of the same comic, famous for the same reason
correct horse battery clip66 bits, Strong: the common words are recognised and counted as words

A comparison knows the patterns it knows, and would rate Tr0ub4dor&3 by its characters. So a handful of famous passwords are known to the tool by name, the two from xkcd 936, hunter2, swordfish and 12345, and each gets a line of its own. The comic's advice stands: generate instead of inventing, and if you pick words, pick them at random. The list of common passwords and words is 800 KB and is fetched from this site the first time a password is typed or a PIN is made with Skip common PINs, never for a generated password.

Every typed password rated Very Weak, and every one that is common, famous or a plain pattern and below Strong, is marked Don't use this password, set apart above the list, with the reason. The list then leaves out the praise for its length or its mix of characters, which would read as a reason to keep it. A typed PIN is marked Don't use this PIN only when it is one of the common PINs above: every PIN is short, so shortness is no reason, and the dates the comparison reads into nearly any string of digits do not count.

Attack scenarios

The brute-force time is how long an attacker needs on average, half of all possibilities, at the rate of the selected scenario. The rates are the tool's assumptions for one current graphics card running Hashcat against a stolen hash, and for guessing online:

ScenarioGuesses per second
MD5221 billion
SHA-256, the default28.4 billion
bcrypt10,000
Online100, a login form with rate limiting

A click on a row selects it. The table shows the time for every scenario at once, which makes the point of a slow hash such as bcrypt visible: the same password lasts millions of times longer.

No API

There is no API for this tool, deliberately: a password generated on a server has been seen by that server. On the command line, openssl rand -base64 24 makes a random password, and in Python the secrets module does.

Privacy

Nothing leaves the browser. Passwords and PINs are drawn on the page, a typed password is rated on the page, and the comparison with common passwords runs locally once its list has loaded. History lives in the page only, and Copy writes to the clipboard only when you press it.