Password Generator
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
| Entropy | Verdict | Rough example |
|---|---|---|
| < 40 bits | Weak | 8 lowercase letters |
| 40–60 bits | Fair | 10 mixed characters |
| 60–90 bits | Strong | 14 mixed characters |
| 90+ bits | Excessive, in a good way | 20 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
- Hash GeneratorCompute SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files using the Web Crypto API.
- UUID GeneratorGenerate cryptographically random version 4 UUIDs in bulk, in several output formats.
- URL Encoder & DecoderPercent-encode and decode URLs and query strings, with a breakdown of each URL component.