Random Password Generator
Make a strong random password with the browser crypto API. Pick length and character sets, skip look alike characters, and see the entropy in bits. Good for accounts, database users, .env secrets and API tokens.
How to use this tool
- Set the length. 16 is good for a login, 32 or more for a secret that only a machine reads.
- Pick the character sets. Turn off symbols if the password goes into a URL, a shell command or a connection string, they need escaping there.
- Copy it. Each click makes a new one, nothing is stored.
Passwords for code and servers
For a .env secret or an API key, length matters more than symbols. 32 letters and digits is about 190 bits, far beyond any attack. Symbols like $, # and quotes break shell scripts, YAML and Docker Compose files unless you quote them.
Database passwords end up inside connection strings, where @, : and / must be URL encoded. The Postgres connection string builder does that for you.
Strong password guide
What makes a strong password?
Length and randomness. A random 16 character password from letters, digits and symbols has about 100 bits of entropy, far beyond any attack. A password built from a word, a year and a symbol is weak no matter how many rules it ticks, attackers try those patterns first.
How long should a password be?
At least 14 to 16 random characters for accounts, 20 or more for admin and email accounts, 32 or more for secrets that only machines read, like API keys and database passwords. NIST guidance now favours length over forced complexity.
Random password generator for API keys and .env files
Use 32 to 64 letters and digits, no symbols. Symbols like $, # and quotes break shell scripts, YAML, Docker Compose files and connection strings unless quoted. 40 alphanumeric characters is about 238 bits.
Password generator without special characters
Turn off symbols and add length to make up for it: each extra character adds about 6 bits. Some old systems refuse symbols, others refuse passwords over 16 characters, check the limit and use the longest allowed.
Are online password generators safe?
This one generates in your browser with crypto.getRandomValues and sends nothing. You can load the page, disconnect from the internet, and it still works. Avoid generators that make the password on their server.
How to remember strong passwords
You do not, a password manager does. Remember one strong passphrase for the manager and let it generate and store the rest. For the few you must type, like the manager itself or a laptop login, use a passphrase.
How often should I change my password?
Only when there is a reason: a breach, a shared password, signs of misuse. Forced changes every 90 days lead to weaker patterns like Summer2026!. Use unique passwords and two step login instead.
Password generator for Wi-Fi
WPA2 and WPA3 Wi-Fi passwords can be 8 to 63 characters. Use 20 or more random characters without confusing look alikes (turn on the option to skip l, 1, O and 0) so guests can type it.
How to create a strong password: step by step
Set the length to 16 or more. Keep letters, digits and symbols on unless the site refuses them. Generate, copy, paste it straight into the site, and save it in your password manager in the same step. Never reuse it on a second site.
Password generator for database users
Database passwords end up inside connection strings, config files and environment variables. Use 32 or more letters and digits only, so @, :, / and % do not need URL encoding. The Postgres connection string builder encodes them if you do use symbols.
Password generator for Linux command line
If you are on a server already: openssl rand -base64 32 (contains + and /), openssl rand -hex 24 (only 0-9 and a-f), or tr -dc A-Za-z0-9 </dev/urandom | head -c 32. PowerShell: [System.Web.Security.Membership]::GeneratePassword(24,4) on Windows PowerShell 5.1.
Password entropy explained
Entropy in bits is length times log2 of the number of possible characters. 26 lowercase letters give 4.7 bits per character, letters plus digits 5.95, all printable ASCII about 6.55. 16 characters from all printable gives about 105 bits. Check any length with the password entropy calculator.
Avoid ambiguous characters
The option to skip look alikes removes l, 1, I, O and 0. Use it for passwords people read off a screen or paper, like Wi-Fi or a temporary password sent to a new user. It costs very little strength.
Temporary passwords for new users
Give each new user a unique random password, send it by a different channel than the username, and force a change at first login. Better still, use a one time setup link instead of a password.
Is a 12 character password enough?
If it is truly random and the site limits login attempts, yes. If the site gets breached and stores passwords with a fast hash, 12 characters from all types (about 78 bits) still holds up well. A 12 character human made password does not. Length plus randomness is what counts.
Password generator for Google, Microsoft and Apple accounts
These accounts protect everything else, including password resets for other sites. Use 20 or more random characters stored in a password manager, plus two step login with an authenticator app or passkey. Passkeys, where offered, are even better than any password.
Password generator vs password manager generator
Most password managers have a generator built in, which saves the password in the same step. Use this page when you need one outside the manager, like a server, a router or a shared secret for a config file.
Strong password examples (do not use these)
t8#Vq2!mLp9&xR4s, Nw7cQ3zKe8Hj2Pf5. Any password shown on a web page is public now, generate your own.
Password generator for a router admin page
Router admin passwords protect your whole network, and many routers still ship with admin or password as the default. Set a long random one (20 characters or more), store it in your password manager, and turn off remote management so the admin page is not reachable from the internet.
Also change the Wi-Fi password away from the one printed on the sticker if neighbours or old guests know it.
Frequently asked questions
Is it really random?
It uses crypto.getRandomValues, the same random source browsers use for TLS keys, and picks each character without bias.
Can you see the password?
No. It is made in your browser and never sent. You can load the page and then go offline, it still works.
How many bits is enough?
For a login with rate limits, 60 bits is plenty. For anything that can be attacked offline, like a leaked hash or a secret key, aim for 80 or more. Check any password with the password entropy calculator.
Easier to type?
Use the passphrase generator instead. Words are easier to type on a phone or TV.
Related tools
- Diceware passphrase generator: words instead of symbols
- Password strength checker: test one you already have
- UUID generator: when you need an ID, not a secret