Secure Password Generator
Generate a strong password in your browser from cryptographic randomness. You choose the length and the character sets, and you see the entropy alongside. The password is never sent anywhere.
Why the source of randomness matters
Most password generators reach for Math.random. That function was built to be fast, not unpredictable: its internal state can be recovered and browsers deliberately keep it weak. The output looks random to the eye; the difference is visible only to an attacker. This tool takes its randomness from crypto.getRandomValues.
The subtler mistake: modulo bias
Taking a random byte and reducing it with a remainder makes some characters appear more often than others. 256 does not divide evenly by 79, so the first slice of the alphabet is systematically more likely. Nothing shows it, and an entropy figure will not catch it. This tool throws away any byte above the clean threshold and draws again — rejection sampling.
Length or variety?
Length. Each character adds the logarithm of the alphabet size in bits, so four more characters buy roughly 25 bits over a 79-character alphabet. Turning symbols on only grows the alphabet from 62 to 79, which on a 20-character password is worth about 7 bits. If you have to choose, make it longer rather than more decorated.
How many bits is enough?
For online accounts anything above 75 bits is comfortable, because the real limit there is how fast the service will let anyone try. For a master password that derives an encryption key, aim for 100 bits: there the attacker works offline and can try billions per second. The thresholds drift down as hardware improves — today's 75 is a decade from now's 60.
What this tool does not do
It does not store, remember or transmit your password. There is no server endpoint that generates passwords: generation happens entirely inside the page. The natural consequence is that closing the page loses the password. Put it in a password manager, not a text file.
The other PassCraft tools
- Strength test — How guessable an existing password is.
- Passphrase — A memorable password built from random words.
- Bulk generation — Many passwords at once.
- Breach check — Does the password appear in known breaches?
- Guide — Password managers, passkeys, multi-factor authentication.