Password generator
Generate strong random passwords using your browser's cryptographic randomness, with entropy shown in bits and no password ever transmitted.
89 possible characters per position.
Generated with your device’s CSPRNG
Nothing is uploaded. This tool runs entirely inside your browser tab. Your files and figures stay on your device - we never receive them, so we cannot read, store or lose them.
Where the randomness comes from
Every character is drawn from crypto.getRandomValues, the Web Crypto API’s cryptographically secure random number generator. It is seeded by your operating system’s entropy pool - hardware sources, timing jitter and other unpredictable input - and it is the same primitive used to generate TLS session keys.
Math.random is deliberately never used. It is fast, it is not seeded securely, and its output is predictable from a handful of observed values. It is fine for shuffling a playlist and unfit for anything protecting an account.
Why the sampling method matters
Turning a random 32-bit number into a character in a 94-character alphabet has an obvious wrong answer: random % 94. Because 2³² is not divisible by 94, the low-numbered characters come up slightly more often than the high-numbered ones. The bias is small, but it is a bias in exactly the place where uniformity is the whole point.
This generator uses rejection sampling instead. Values landing in the uneven tail are discarded and redrawn, so every character in the alphabet is exactly equally likely.
It also guarantees at least one character from each enabled set, without stacking them at the front: the required characters are drawn first, the remainder fills from the whole alphabet, and the result is shuffled with Fisher–Yates.
Entropy, in numbers
entropy (bits) = length × log₂(alphabet size)
| Length | Lowercase only (26) | Letters + digits (62) | All sets (94) |
|---|---|---|---|
| 8 | 37.6 bits | 47.6 bits | 52.4 bits |
| 12 | 56.4 bits | 71.5 bits | 78.7 bits |
| 16 | 75.2 bits | 95.3 bits | 104.9 bits |
| 20 | 94.0 bits | 119.1 bits | 131.1 bits |
A useful reference point: 128 bits is the standard target for cryptographic keys. Anything at or above it is not going to be brute-forced by anyone, ever.
Notice that a 16-character lowercase password (75 bits) beats a 12-character password using every symbol class only marginally - and beats an 8-character one using every class comfortably. Length is the cheaper lever than complexity, and it is the one humans tolerate better.
What entropy does not protect against
A perfectly random password is worthless if it is reused. Credential-stuffing attacks do not guess passwords; they replay ones already leaked from another breach. Strength protects against brute force, uniqueness protects against reuse, and only a password manager gives you both at scale.
Nor does entropy help if the password is phished. Enable two-factor authentication wherever it is offered - preferably an authenticator app or hardware key rather than SMS, which is vulnerable to SIM-swap.
Modern guidance
NIST’s SP 800-63B reversed decades of received wisdom. It now recommends against mandatory periodic password changes, and against forced composition rules like “must contain a symbol”. Both push people toward predictable patterns - Password1! becoming Password2!. What it recommends instead is length, a check against known-breached password lists, and no arbitrary maximum length.
Common questions
Is it safe to generate a password on a website?
It depends entirely on whether generation happens on your device or on a server. This one runs in your browser using the Web Crypto API - the password is never transmitted, never logged and never exists outside this tab. You can verify that by opening your browser's network panel and watching that no request fires when you click Regenerate. A generator that produces passwords server-side has, by construction, seen your password.
What does entropy in bits actually mean?
It is the base-2 logarithm of the number of possible passwords your settings could produce. Each additional bit doubles the search space. A 20-character password from a 94-character alphabet has about 131 bits, meaning roughly 2¹³¹ possibilities - beyond any conceivable brute-force effort. Below about 60 bits, an offline attack against a fast hash becomes realistic.
How long should a password be?
For anything protected by a password manager, 20 or more characters costs you nothing since you never type it. For a master password or something you must memorise, a long passphrase of five or six random words is easier to remember and stronger than a short scrambled string. Length beats complexity - a 16-character lowercase-only password has more entropy than a 10-character one using every symbol.
Why avoid look-alike characters?
If you will ever read the password aloud, copy it from a screen, or type it from a printed sheet, characters like 0/O and 1/l/I cause real errors. Turning that option on removes roughly 20 characters from the alphabet, costing about 0.3 bits per character - worth it for a Wi-Fi password on a café wall, unnecessary for something living in a password manager.
Last reviewed