The Password Generator makes a random password from the options you pick above: a length from 8 to 64 characters, and any mix of lowercase letters, uppercase letters, numbers and symbols. You can also leave out characters that are easy to mix up, like 0 and O or 1, l and I. Every change makes a new password, and the strength meter shows roughly how hard it would be to guess.
How it works
My first idea was to pick a character type at random for each position, then pick a character from that type. It works, but it has a flaw: the types aren't the same size. With letters and numbers checked, a number would come up half the time, so each of the 10 digits would be far more likely than each of the 52 letters. That makes the password a little easier to guess than it should be.
So the generator works in three steps instead:
- It picks one character from each type you checked, so a password always meets rules like "must contain a number."
- It fills the rest from one combined list of every allowed character, so each character is equally likely.
- It shuffles the result, so the guaranteed characters don't always sit at the front.
The randomness comes from your browser's built-in cryptographic random number generator (crypto.getRandomValues, part of the Web Crypto API), not Math.random, which isn't designed for secrets. Turning a random number into a position in the list uses rejection sampling, which avoids the small bias you get from a plain remainder (%).
The strength meter estimates the password's entropy: length × log₂(number of possible characters). A 16-character password using all four types comes out at about 103 bits, meaning around 2¹⁰³ possible passwords. That's far beyond what anyone could try.
Why it's safe to use
- It never leaves your device. The password is made in your browser and only shown on the page. It isn't sent to this site or anyone else, and it isn't saved, logged or put in the address bar.
- It can't be guessed from anything about you. Nothing about you or the site you're signing up for goes into it, so knowing either doesn't help an attacker.
- The page locks down where data can go. This page has a strict Content Security Policy, a browser rule that stops scripts on the page from sending data to other servers or loading code from them. The page also has no analytics or third-party scripts.
- Your browser doesn't remember it. The password is shown as text, not in a form field, so your browser's form history and autofill never pick it up.
What it can't protect against
No website can make a password completely safe:
- Your device. Malware, keyloggers or a malicious browser extension can see anything on your screen.
- The clipboard. When you copy the password, other apps, clipboard history or clipboard syncing between devices may be able to read it.
- The site you use it on. If that site stores passwords badly or gets breached, the password can leak no matter how it was made.
- Reuse. Use each password on one site only.
The safest way to use it is to paste it straight into the sign-up form and let your password manager save it there. A website can't save a password to your password manager for another site (browsers block that on purpose), so the save has to happen on the site you're signing up for. Most password managers can also generate passwords right in the sign-up form, which skips the clipboard entirely.