Appearance

Password Generator

/password-generator/

Related tools

Comments

0/500

About this tool

Why you should use a random password generator

Passwords people think up are more predictable than they seem. Patterns such as a birthday, the last digits of a phone number, or a favorite word with numbers and an exclamation mark tacked on are already in the dictionaries and mutation rules attackers use. Credential stuffing, where usernames and passwords leaked from one site are tried on others, is also common, so reusing a password means that the moment the weakest site is breached, your other accounts are at risk too.

Read moreShow less

That is why security experts recommend a different, sufficiently long, random password for every site, with a password manager doing the remembering.

Choose which character types to use (uppercase, lowercase, digits, symbols) and a length from 4 to 64, and this tool creates a password that meets those conditions and shows its strength in bits; changing the length or options afterwards instantly produces a new one.

Password strength measured as entropy

Strength is calculated as entropy. With N possible characters and length L there are N to the power L combinations, which in bits is L × log2(N). This tool's character sets are 26 uppercase letters, 26 lowercase letters, 10 digits and 27 symbols (!@#$%^&*()-_=+[]{};:,.<>/?~), 89 in total with all four on. The default length of 16 gives 16 × log2(89) ≈ 103.6, shown rounded as 104 bits. The same mix gives 78 bits at 12 characters and 52 bits at 8, while a 4-digit numeric PIN has only 10,000 combinations, or 13 bits.

Each extra bit doubles the number of combinations. As a comparison, assume a hypothetical offline attack making 10 billion guesses per second: covering all of 52 bits takes about 5.2 days, 78 bits about 960,000 years and 104 bits about 6.4 × 10^13 years; real speeds vary with how a service stores passwords and with the attacker's hardware. The strength label reads Weak below 40 bits, Fair below 60, Strong below 80 and Very strong at 80 or more.

Randomness comes from crypto.getRandomValues. Math.random is fast, but its next values can be predicted once its internal state is estimated, so it is not used for security. The bias that a simple remainder operation introduces when picking numbers in a range is removed by discarding out-of-range values and drawing again. At least one character from each selected type is placed first, the remaining positions are filled from the full set, and the order is shuffled with the Fisher-Yates method.

Choosing length and character types for each use

For an ordinary website account, all four types and 12 or more characters (78 bits) puts you in the Strong range. For accounts that unlock other accounts, such as email, banking or work, 16 or more is recommended.

Some sites do not allow symbols, or allow only some. In that case, turn symbols off and increase the length. With the 62 letters and digits, 16 characters give 95 bits and 20 give 119, actually stronger than 16 characters with symbols. Common composition rules fare worse than they look: 10 characters of lowercase letters and digits is 52 bits, and 8 characters of lowercase, digits and symbols is 48 bits, both in the Fair range by this tool's measure.

For a Wi-Fi password, or anything you must copy by reading it off a screen, turn on Exclude look-alikes to drop characters that resemble each other, such as 0 and O, or 1, l and I. The character count drops from 89 to 83, lowering 16 characters from 104 to 102 bits, so add a character or two if that worries you.

Why the bit count is not the whole story

Entropy figures are meaningful only if the password was truly drawn at random. A human-chosen P@ssw0rd2024 looks strong by character types and length, yet it is exactly the kind of form that sits at the top of attackers' dictionaries and mutation rules. The bits shown here apply to passwords this tool creates; it does not check the strength of passwords made elsewhere. And because each selected type is guaranteed at least one character, the real entropy is very slightly lower than the figure shown.

No password, however strong, helps if you type it into a phishing site or reuse it across sites. The US NIST digital identity guidelines (SP 800-63B) also emphasize sufficient length and screening against lists of breached passwords over complex composition rules or forced periodic changes. Turning on two-factor authentication wherever possible often does more than strengthening a single password.

Passwords are created inside this browser and are never sent to a server or saved. Only options such as length and character types are kept in this browser for next time. The password itself is not kept, so once you close the page or press Reset it cannot be shown again; save it to your password manager or the site right away. Copy leaves it on the clipboard, so on a shared computer, copy something else afterwards to overwrite it.

FAQ

How long should a password be?

With all four character types, 12 or more characters (about 78 bits) is enough for ordinary accounts, and 16 or more (about 104 bits) is recommended for important ones such as email and banking. If you use a password manager, 20 characters or more is fine.

Is the generated password stored anywhere?

No. It is created in the browser with crypto.getRandomValues and is never sent or recorded. It cannot be shown again after you close the page, so save it right away.

What if a site does not allow special characters?

Turn symbols off and make it longer. Twenty characters of upper and lower case letters and digits give about 119 bits, stronger than 16 characters with symbols (about 104 bits).

What do bits mean in password strength?

Bits express the number of possible combinations as a power of 2, and each extra bit doubles it. This tool labels anything under 40 bits Weak and 80 bits or more Very strong.

How secure is a 4-digit or 6-digit PIN?

A 4-digit PIN has 10,000 combinations, about 13 bits, and a 6-digit PIN has 1,000,000, about 20 bits. A computer can try them all instantly, so PINs are safe only where attempts are limited, for example by lockouts or device locks.

Which characters does Exclude look-alikes remove?

The digits 0 and 1, uppercase O and I, and lowercase o and l. It reduces mistakes when copying by eye, and strength drops slightly because there are fewer characters to choose from.