Password generator
Create a strong, truly random password for a new account, Wi-Fi network or database. Passwords are generated on your device with your browser's cryptographic random number generator and are never sent anywhere.
Loading the password generator. It needs JavaScript to run in your browser.
Loading the password generator. It needs JavaScript to run in your browser.
How to use the password generator
- Set the lengthDrag the slider or type a number between 4 and 128. Sixteen characters is a sensible minimum for online accounts; use 20 or more for anything important.
- Choose the charactersKeep all four sets switched on unless a website rejects certain characters. Turn on “Avoid look-alikes” if you'll ever have to read the password aloud or type it from paper.
- Check the strength meterIt shows how many bits of entropy the settings give you. Aim for “Strong” or “Very strong”.
- Copy it, then save itPress Copy and paste the password straight into your password manager or the sign-up form. Press New password if you want a different one.
At a glance
- Length
- 4 to 128 characters (16 by default)
- Character sets
- Upper case, lower case, digits, symbols
- Randomness
- crypto.getRandomValues, the browser’s secure generator
- Strength
- Entropy in bits, shown as you change settings
- Privacy
- Generated on your device; never sent or stored
- Cost
- Free, no sign-up
Learn more
How this generator creates passwords
Every character is picked with crypto.getRandomValues, the browser’s cryptographically secure random number generator. Ordinary JavaScript randomness (Math.random) is fine for games but predictable enough that it should never be used for secrets, so this tool doesn’t use it. The generator also avoids a subtle flaw called modulo bias, where some characters come up slightly more often than others because of how random numbers are mapped onto a character set. Instead, any random value that would cause bias is thrown away and drawn again.
When you select several character sets, the generator guarantees at least one character from each of them, then fills the rest of the password from all the sets combined and shuffles the result. That way a password with symbols switched on always contains a symbol, which matters for sites that check, without making the position of any character predictable.
Reading the strength meter
The meter shows entropy, the number of bits of randomness the settings give you, calculated as the length multiplied by log₂ of the number of possible characters. It is an honest measure for passwords generated at random, as these are. It doesn’t apply to passwords people make up, because human choices are far more predictable than the arithmetic suggests.
| Entropy | Label | What it resists |
|---|---|---|
| Under 40 bits | Weak | Online guessing only, and only with rate limits |
| 40 to 59 bits | Fair | Casual offline attacks |
| 60 to 79 bits | Strong | Determined offline cracking of a leaked database |
| 80 bits and above | Very strong | Any realistic attack, now and for years to come |
When to change the default settings
The defaults (16 characters, all four sets) suit most accounts. Change them when the situation calls for it:
- Wi-Fi passwords are typed on TVs, printers and game consoles with awkward keyboards. Turn on “Avoid look-alikes” and consider turning off symbols, then raise the length to 20 to keep the strength up. A Wi-Fi QR code saves your guests from typing it at all.
- PINs and legacy systems sometimes only accept digits or letters. Switch off the other sets and increase the length.
- Database and API credentials are only ever pasted by machines. Go long, 32 characters or more, with every set enabled.
Where to keep your new password
A strong password is only useful if you don’t reuse it and don’t lose it. Store it in a password manager rather than a note on your desktop or a sticky note on your screen. If you can’t use a manager, write it down and keep the paper somewhere safe at home: an attacker on the internet can’t read a piece of paper in your drawer. Our guide on creating a strong password covers passphrases, reuse and two-factor authentication in more detail.
Questions
Is it safe to generate a password on a website?
It is safe here because the password never leaves your device. It is created by JavaScript running in your browser using the Web Crypto API, the same random source browsers use for encryption keys. Nothing is sent to our server, logged or stored, and we never see the result.
How long should my password be?
For everyday online accounts, 16 random characters from all four character sets is far beyond what attackers can guess. For a password manager's master password or a Wi-Fi network you share widely, go to 20 or more. Length adds strength faster than any other setting.
What does "bits of entropy" mean?
It measures how many guesses an attacker would need in the worst case. Each extra bit doubles the number of possibilities. A 16-character password using all 86 characters has about 103 bits, which means roughly 10 to the power of 31 possible passwords.
Why does a site reject my generated password?
Some sites limit length or forbid certain symbols. Lower the length to the site's maximum, or switch off Symbols and add a few extra characters of length to make up for the smaller character set.
Should I memorize these passwords?
No. Random passwords are meant to be stored in a password manager, which fills them in for you. Keep one strong, memorable passphrase for the password manager itself, and let it remember everything else.
Is a random password better than a passphrase?
Both can be strong. A random password packs more strength into fewer characters, so it suits places where a manager fills it in. A passphrase of five or six random words is easier to remember and type, so it suits the few passwords you must type by hand.