About the Password Generator
Create strong random passwords with this password generator: pick a length from 4 to 128 characters, choose which letters, numbers and symbols to use, and copy the result. Every character comes from your browser's cryptographic random source, and the password never leaves your device.
A 20-character password with all four character sets is ready when the page loads. Change any option and you get a new one, and the Strength line shows in bits what that change cost.
- Copy the password at the top with the Copy button, or click Generate new until you get one you like.
- Drag the Length slider anywhere from 4 to 128. Each change makes a new password right away.
- Tick or untick Uppercase letters, Lowercase letters, Numbers and Symbols. The password always contains at least one character from every set you leave ticked.
- Tick Exclude look-alike characters (0 O o 1 l I) when someone will read the password off paper or type it with a TV remote.
- Read the Strength line: Weak below 50 bits, Fair below 80, Strong below 110, Very strong from 110 up.
- Need a batch for test accounts or a credential rotation? Click Generate 10. The Copy button over the list copies all ten, one per line.
InputLength: 20
Uppercase, Lowercase, Numbers, Symbols: tickedOutputM*-s[u/t{;>J(Y,IpJV5
Strength: Very strong (about 130 bits of entropy)Yours will be different. Every click draws a new password, and none is stored anywhere.
InputLength: 32
Symbols: untickedOutputHBe8ybAKknolnfHGCOyi1BlMz5Z91VYn
Strength: Very strong (about 191 bits of entropy)Letters and digits only, so it's safe to paste into a connection URL, a .env file or a shell command without quoting or escaping.
InputLength: 16
Symbols: unticked
Exclude look-alike characters: tickedOutputXxjiJ4Q4UAMYrkRt
Strength: Strong (about 93 bits of entropy)No zero next to a capital O, no l next to a 1. A WPA2 passphrase can be 8 to 63 characters, so there is room to go longer.
How the passwords are made
Randomness comes from crypto.getRandomValues, never Math.random. Random values that would make some characters slightly more likely than others are thrown away (this avoids modulo bias), so every character in the pool has the same chance.
The generator picks one character from each ticked set, fills the rest from all ticked sets combined, then shuffles. The 27 symbols are ! @ # $ % ^ & * ( ) - _ = + [ ] { } ; : , . < > ? / ~. The one-per-set rule costs a little entropy (about 0.14 bits at length 20), which the Strength line doesn't subtract.
Entropy and time to crack
For a random password, entropy in bits = length × log2(pool size). All four sets give a pool of 89 characters, or 6.48 bits per character. Letters and digits give 62 (5.95 bits), and digits alone give 10 (3.32 bits). Every extra bit doubles an attacker's work.
Here's how long it takes to try every combination at 100 billion guesses per second, about what one high-end gaming GPU does against MD5 hashes. Online attacks against a login form are millions of times slower, but leaked password databases get attacked offline like this.
- 8 lowercase letters (38 bits): about 2 seconds.
- 8 characters, all four sets (52 bits): about 11 hours.
- 12 letters and digits (71 bits): about 1,000 years.
- 12 characters, all four sets (78 bits): about 78,000 years.
- 16 characters, all four sets (104 bits): about 5 trillion years.
Length beats complexity
A 20-character password of only lowercase letters has about 94 bits. A 12-character one with all four sets has about 78. More characters help more than more character types, and they're easier to type.
NIST SP 800-63B (revision 4, 2025), the US guideline many companies worldwide follow, tells services to:
- require at least 15 characters for password-only logins, and 8 with a second factor;
- accept passwords of at least 64 characters, including spaces and Unicode;
- drop character-type rules and scheduled changes, but force a change after a compromise;
- check new passwords against lists of common and breached passwords;
- allow password managers, autofill and paste.
Symbols that break config files and URLs
Passwords for databases, queues and API clients end up in places where some symbols have a meaning. A password containing @, :, / or # breaks a URL like postgres://app:PASSWORD@db.example.com:5432/shop unless you percent-encode it with the URL Encoder. In many .env loaders an unquoted # starts a comment, and Docker Compose treats $ as the start of a variable. In a shell, $ and backticks inside double quotes are expanded. In YAML, a value that starts with *, &, !, [ or { needs quotes.
For secrets that machines read, untick Symbols and add length instead. 32 letters and digits give about 191 bits, far more than any attacker can search, with nothing to escape.
Passphrases, password managers and reuse
For the few passwords you must remember, like a password manager's master password, a passphrase is easier. Six words rolled with dice from a 7,776-word list (the Diceware method) give about 77.5 bits, as long as dice pick the words and you don't. This page makes random-character passwords only.
For everything else, let a password manager store a different password for each site. Reuse turns one breach into many, because attackers try leaked email and password pairs on other services. To send a password to a colleague, encrypt it with AES and share the passphrase another way.
If you're building a login system, store passwords with Argon2id, scrypt or bcrypt. A fast hash like the SHA-256 from the Hash Generator is the wrong tool for that.
Generate a password in code
Use a cryptographic random source: secrets in Python, node:crypto in Node.js, crypto.getRandomValues in the browser. Python's random module and JavaScript's Math.random() are predictable and don't belong anywhere near a password.
openssl rand -base64 24
# A7myeuEF9UI8taj0aYSbmdk5jf3ehyeY (32 characters, 192 bits)import secrets, string
alphabet = string.ascii_letters + string.digits + string.punctuation
password = "".join(secrets.choice(alphabet) for _ in range(20))const { randomInt } = require("node:crypto");
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";
const password = Array.from({ length: 20 }, () => chars[randomInt(chars.length)]).join("");Is it safe to use an online password generator?
It is when the password is made on your device and never transmitted, which is how this page works: your browser generates it with crypto.getRandomValues, and nothing is sent or logged. To check, load the page, switch off your network and keep clicking Generate new.
How long should a password be?
At least 15 characters for an account that has only a password, which is the NIST minimum for that case. If a password manager remembers it for you, use 20 or more; a longer password costs you nothing.
How long would it take to crack a 12-character password?
If it's random and uses letters, digits and symbols, trying every combination at 100 billion guesses per second takes about 78,000 years. A 12-character password a person made up, like Summer2026!!, can fall in seconds, because cracking tools try common patterns first.
Do I need symbols in my password?
They help a little, about half a bit per character. If a site rejects symbols, untick Symbols and add two characters: 22 letters and digits are as strong as 20 characters with symbols.
What are look-alike characters?
Characters that are easy to confuse on paper or in some fonts: zero and the letters O and o, the digit one, lowercase L and capital I. Leaving them out costs about 0.1 bits per character.
How often should I change my passwords?
Only when there's a reason, such as a breach or a sign that someone else knows the password. Forced changes on a schedule lead people to pick weaker, predictable passwords, and NIST now tells services not to require them.