Password Generator

Entropy
Character pool
Offline crack time

Generated locally with crypto.getRandomValues(). Nothing is sent, logged or remembered.

Generate strong random passwords or passphrases using your browser's cryptographic random number generator, with a live entropy calculation. Nothing is transmitted or stored.

Why modulo bias matters

The obvious way to pick a random character ispool[random % pool.length]. If the random range is not an exact multiple of the pool size, the first few characters come up slightly more often than the rest. The bias is small, but it is a free reduction in strength.

This generator uses rejection sampling instead: draw a random byte, discard it if it falls in the uneven tail, and draw again. Every character in the pool then has exactly equal probability.

Reading the entropy number

EntropyVerdictRough example
< 40 bitsWeak8 lowercase letters
40–60 bitsFair10 mixed characters
60–90 bitsStrong14 mixed characters
90+ bitsExcessive, in a good way20 mixed characters

Crack times assume an offline attack against a fast hash at 100 billion guesses per second. Against a properly configured password hash such as Argon2 or bcrypt the real figures are enormously longer — but you have no way to know which the site uses, so plan for the fast one.

Frequently asked questions

Are these passwords actually random?

They come from crypto.getRandomValues(), the browser's cryptographically secure random number generator, seeded by the operating system's entropy pool. Selection uses rejection sampling rather than a modulo, which would otherwise make some characters marginally more likely than others. Math.random() — used by many generators — is not suitable for this and is never used here.

Is it safe to generate a password on a website?

On this page the generation happens entirely in your browser, nothing is transmitted, and nothing is stored — reload and it is gone. The general caution is still worth keeping: a page you do not trust could send what it generates anywhere. If that matters to you, use your password manager's built-in generator, which is the better habit regardless.

How long should a password be?

Sixteen characters from a mixed alphabet is comfortably beyond brute-force reach today, and 20 or more is sensible for anything protecting money or identity. Length beats complexity: a 20-character lowercase passphrase has more entropy than a 10-character password full of symbols, and you can actually type it.

What does the entropy figure mean?

Bits of entropy measure how many guesses an attacker needs on average — each additional bit doubles that number. Under 50 bits is weak, 60 to 80 is reasonable for ordinary accounts, and above 100 is more than any offline attack will reach. It assumes the attacker knows your exact character set and length, which is the correct pessimistic assumption.

Related tools