Password Generator
Create a strong random password on your own device, then see its entropy in bits, the number of possible passwords and the average time to guess it.
More options
Random 16 characters from a pool of 94, created on this device and never sent anywhere.
Entropy bands from very weak to very strong. Very strong starts at 112 bits, the NIST minimum security strength. The bar runs to 160 bits.
Average time to guess
Average time for an attacker who knows your length and character settings and tries every combination. Trying all of them takes 96.9 trillion years.
Your calculation
The same steps the generator runs, with your settings.
- Character pool: 26 + 26 + 10 + 32 = 94 characters.
- All 16 character strings: 94¹⁶ = 3.72 × 10³¹, or 16 × log2(94) = 16 × 6.5546 = 104.87 bits.
- Keep only strings that contain every selected type: 3.06 × 10³¹ remain, so log2(3.06 × 10³¹) = 104.59 bits.
- Average guesses: 3.06 × 10³¹ ÷ 2 = 1.53 × 10³¹. At 10 billion guesses per second: 1.53 × 10³¹ ÷ 10¹⁰ = 1.53 × 10²¹ seconds = 48.5 trillion years.
Other lengths with these settings
Same character types and guess rate, with only the length changed.
| Length | Bits | Avg time at 10 billion/s | Rating |
|---|---|---|---|
| 8 | 51.3 | 1.62 days | Weak |
| 12 | 78.1 | 528 thousand years | Fair |
| 15 | 98.0 | 500 billion years | Strong |
| 20 | 130.9 | 4.10 × 10²¹ years | Very strong |
| 24 | 157.2 | 3.34 × 10²⁹ years | Very strong |
| 32 | 209.7 | 2.13 × 10⁴⁵ years | Very strong |
| 64 | 419.5 | 3.02 × 10¹⁰⁸ years | Very strong |
Five more passwords
Each is generated independently with the same settings. Select one to copy it.
Passwords are generated with crypto.getRandomValues in this browser tab and are never sent or saved. Entropy and guessing times apply only to randomly generated passwords.
How the Password Generator Works
This password generator builds a pool from the character types you select, then picks each character of the password from that pool at random. The random numbers come from crypto.getRandomValues, the browser function that MDN documents as producing cryptographically strong random values from a generator seeded with enough entropy for cryptographic use. Everything happens inside this browser tab: no password is sent to a server, logged or stored.
Picking a character fairly takes more care than dividing a random number by the pool size. A 32 bit random number has 4,294,967,296 possible values, which does not divide evenly by 94, so a plain remainder would favor some characters slightly. The generator discards the few values above the largest multiple of the pool size and draws again, a method called rejection sampling, so every character is exactly as likely as every other.
When Include every selected type is on, the generator draws a full password and starts over if any selected type is missing. That keeps every valid password equally likely, and the entropy shown is calculated for exactly that set of passwords. The page also lists five more passwords made the same way, so you can pick one that a site's own rules accept.
Password Entropy Formula
Entropy measures how many guesses a brute force search needs, expressed in bits. For a password whose characters are chosen independently and at random, the number of possible passwords is the pool size raised to the length, and the entropy is the base 2 logarithm of that number.
Requiring one character of each type removes the passwords that lack a type. The generator counts what remains with the inclusion and exclusion principle: start with NL, subtract the strings that avoid each type, add back the strings that avoid each pair of types, and so on. For 16 characters the rule costs 0.28 bits, a small price for passing sites that insist on every type.
The formula holds only for random passwords. A password a person invents, such as a word with a number and a symbol added, has far less real entropy than its length suggests, because attackers try words, names, dates and leaked passwords first.
How Many Characters Does a Password Need?
Each character adds log2(N) bits, so a smaller pool needs a longer password to reach the same strength. The table gives the shortest length that reaches 80 bits, the start of the Strong band, and 112 bits, the start of Very strong, without the one of each type rule.
| Character set | Pool | Bits per character | For 80 bits | For 112 bits |
|---|---|---|---|---|
| Digits only (PIN) | 10 | 3.322 | 25 | 34 |
| Lowercase letters | 26 | 4.700 | 18 | 24 |
| Upper and lowercase letters | 52 | 5.700 | 15 | 20 |
| Letters and digits | 62 | 5.954 | 14 | 19 |
| Letters, digits and 32 symbols | 94 | 6.555 | 13 | 18 |
Adding length is the most reliable way to add strength, because every site accepts letters and digits while some reject certain symbols. Two extra letters or digits add 11.9 bits, more than switching a 16 character password from 62 to 94 characters, which adds 9.6 bits.
How Long Does It Take to Crack a Password?
Guessing time equals the number of guesses divided by the guessing speed. On average an attacker finds a random password after trying half of all possibilities. The speed depends on the attack: a login page that follows NIST SP 800-63B must disable a password after no more than 100 consecutive failed attempts, while an attacker who steals a file of password hashes can guess offline with no limit. NIST notes that offline attackers can compute many billions of hashes per second.
| Password | Bits | 1,000 per second | 10 billion per second | 1 trillion per second |
|---|---|---|---|---|
| 6 digit PIN | 19.9 | 8.33 minutes | under 1 second | under 1 second |
| 8 random characters | 51.3 | 44.5 thousand years | 1.62 days | 23.4 minutes |
| 12 random characters | 78.1 | 5.28 trillion years | 528 thousand years | 5.28 thousand years |
| 6 word EFF passphrase | 77.5 | 3.5 trillion years | 350 thousand years | 3.5 thousand years |
| 15 random characters | 98.0 | 5.00 × 10¹⁸ years | 500 billion years | 5 billion years |
| 16 random characters | 104.6 | 4.85 × 10²⁰ years | 48.5 trillion years | 485 billion years |
| 20 random characters | 130.9 | 4.10 × 10²⁸ years | 4.10 × 10²¹ years | 4.10 × 10¹⁹ years |
Random character rows use all 94 printable characters with every type included. The three speeds are assumptions for comparison, not measurements: real offline speed depends on the hashing scheme, and NIST requires sites to salt and hash passwords with a cost factor that makes each guess more expensive. A 6 digit PIN survives only where guesses are limited: with the 100 attempt cap, an attacker has a 100 in 1,000,000 chance, or 0.01 percent.
Password Rules from NIST and CISA
NIST Special Publication 800-63B-4, the 2025 revision of the federal digital identity guidelines, sets these rules for sites that verify passwords:
- Minimum length: 15 characters when the password is the only factor, and 8 when it is part of multifactor authentication.
- Maximum length: sites should allow at least 64 characters.
- Characters: sites should accept all printing ASCII characters and the space.
- No composition rules: sites shall not require a mix of character types.
- No forced changes: sites shall not require periodic changes, but must force one after evidence of compromise.
- Blocklists: sites shall reject commonly used, expected or compromised passwords.
- Password managers: sites shall allow password managers and autofill, and should allow paste.
CISA's Secure Our World guidance gives the same advice to the public in three rules: make passwords long, at least 16 characters; make them random, either a random string of mixed case letters, numbers and symbols or a passphrase of 4 to 7 unrelated words; and make them unique to each account. CISA recommends a password manager to generate and store them, so you only need to remember the one passphrase that opens it.
Strength Ratings Used by This Page
The rating badge is based on entropy alone. The top band starts at 112 bits because NIST SP 800-63B cites 112 bits as the minimum security strength set in NIST SP 800-131A. The lower bands are this page's own steps of 20 bits; each step of 20 bits multiplies the number of possible passwords by 2²⁰ = 1,048,576.
| Rating | Entropy | Possible passwords at the lower edge |
|---|---|---|
| Very weak | Under 40 bits | Fewer than 1.10 × 10¹² |
| Weak | 40 to under 60 bits | 1.10 × 10¹² |
| Fair | 60 to under 80 bits | 1.15 × 10¹⁸ |
| Strong | 80 to under 112 bits | 1.21 × 10²⁴ |
| Very strong | 112 bits or more | 5.19 × 10³³ |
For a typical online account protected by rate limiting and a unique password, Strong is ample. Aim for Very strong when a password protects encrypted data or a password manager, where a stolen copy can be attacked offline for as long as the attacker likes.
Random Passwords Versus Passphrases
A passphrase strings together words picked at random from a list. EFF's long wordlist has 7,776 words, one for every roll of five dice, so each word adds log2(7,776) = 12.92 bits. EFF suggests six words, which gives 7,776⁶ = 2.21 × 10²³ possibilities, about 2⁷⁷ or 77.5 bits. That is close to a random 12 character password from all 94 characters at 78.1 bits.
Passphrases are easier to type and remember, which suits the few secrets you must enter by hand: a password manager's master password or a disk encryption key. Random character passwords pack more strength into each character, which suits the many site passwords a password manager fills in for you. The words must be chosen at random, not picked by you, for the entropy figure to hold.
How to Use the Generator
- Length: drag the slider up to 64 or type up to 128.
- Character types: tick the types the site accepts.
- Symbol set: use Basic 8 if a site rejects quotes or brackets.
- More options: avoid look alikes for passwords you read aloud or type, exclude specific characters, or change the guess rate used for timing.
- Copy: copy the password straight into your password manager.
Common Mistakes
- Reusing a password. One breach exposes every account that shares it.
- Editing the result. Swapping characters for a word or a date lowers the real entropy.
- Short with symbols. 8 random characters fall in about 1.62 days at 10 billion guesses per second.
- Saving in a plain text file. Use a password manager instead.
- Trusting strength meters on invented passwords. Entropy assumes random choice.
Frequently Asked Questions
How long should a password be?
NIST Special Publication 800-63B-4 (2025) requires passwords used as the only login factor to be at least 15 characters and passwords used with multifactor authentication to be at least 8, and says sites should allow at least 64. CISA recommends at least 16 characters for every account. For a random password drawn from all 94 printable characters, 16 characters gives 104.6 bits of entropy with every character type included, and 18 characters is the shortest length that passes 112 bits. Longer is stronger, so use the most a site accepts when a password manager fills it in.
Is this password generator safe to use?
Passwords are created inside your browser with crypto.getRandomValues, the Web Cryptography function that MDN describes as producing cryptographically strong random values. Nothing you generate is sent to a server or stored by this page, and each character is chosen with rejection sampling so every character in the pool is equally likely. For best results, generate the password on a device you trust, paste it straight into a password manager, and use a different password for every account, as CISA recommends.
What makes a password strong?
A strong password is long, random and unique. CISA asks for at least 16 characters, either a random mix of letters, numbers and symbols or a passphrase of unrelated words, and a different password for each account. Randomness matters because attackers try common words, names and breached passwords first, so a long password built from a pattern can fall quickly. A generated password has a known entropy: 16 random characters from 94 possible characters give about 104.6 bits, or roughly 3 × 10³¹ possible passwords.
How is password entropy calculated?
Entropy in bits equals the length times log2 of the pool size, H = L × log2(N), and it applies only to passwords chosen at random. A 16 character password drawn from 94 characters has 16 × 6.5546 = 104.87 bits. Requiring at least one uppercase letter, lowercase letter, number and symbol removes the strings that lack a type, which leaves 3.06 × 10³¹ possibilities, or 104.59 bits. Each extra bit doubles the number of guesses, and every 20 bits multiplies it by about one million.
How long does it take to crack a 12 character password?
It depends on how the password was made and how fast an attacker can guess. A random 12 character password from all 94 printable characters, with every type included, has 3.33 × 10²³ possibilities. At an assumed 10 billion guesses per second, in line with NIST's note that offline attackers can compute many billions of hashes per second, the average search takes about 528 thousand years. At 1 trillion per second it takes 5.28 thousand years. A 12 character password based on a word or pattern can fall far sooner, because attackers try those first.
Do passwords need symbols and numbers?
Current NIST guidance tells sites not to impose composition rules such as requiring a mix of character types. Symbols still add strength because they enlarge the pool: letters and numbers give 62 characters and 5.95 bits each, while all 94 printable characters give 6.55 bits each. A 16 character password from letters and numbers has 95.2 bits, and making it 18 characters gives 107.1 bits, more than 16 characters with symbols. Turn symbols on when a site requires them, or add length when a site rejects them.
Sources & References
- National Institute of Standards and Technology. SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management, 2025 (password length, characters, composition rules, blocklists, password managers, rate limiting, hashing, offline attack speed, 112 bit minimum security strength). pages.nist.gov
- Cybersecurity and Infrastructure Security Agency. Secure Our World: Use Strong Passwords (at least 16 characters, random, unique, passphrases of 4 to 7 words, password managers). cisa.gov
- MDN Web Docs. Crypto: getRandomValues() method (cryptographically strong random values in the browser). developer.mozilla.org
- OWASP Foundation. Password Special Characters (the 32 punctuation characters on a US keyboard, plus space). owasp.org
- Electronic Frontier Foundation. EFF Dice Generated Passphrases (7,776 word long list, six word passphrases of about 2⁷⁷ possibilities). eff.org
Entropy and guessing times are estimates for randomly generated passwords under the stated assumptions, not guarantees of security. Every number on this page was recomputed with the same formulas the generator uses. Methodology reviewed: 2026.