🔒 Password Generator

Random Password Generator

Generate a password built entirely from cryptographically random characters — no patterns, no predictability.

----

What does "random" actually mean here?

Every character is drawn independently from your browser's Web Crypto API (crypto.getRandomValues()), a cryptographically secure random number generator designed for security-sensitive tasks. Each draw uses rejection sampling so every character in the selected pool has an exactly equal chance of appearing — no character or position is more likely than another.

How is this different from a "strong" password?

A password can be random but still weak if it is too short. Randomness removes predictable patterns; length and character variety determine how large the search space is. This tool controls both, but is focused specifically on giving you unbiased, pattern-free output — pair it with a length appropriate to the account (see the strong password generator for a longer default).

Why not Math.random()?

Math.random() is a general-purpose pseudorandom generator not designed to resist prediction, and some implementations are not suitable for security purposes. This tool never uses it — only the Web Crypto API is used to generate passwords.

What randomness resists, and why length still matters

Randomness defeats guessing strategies that rely on predictable choices — dictionary words, keyboard patterns, personal dates — because every character is drawn independently and uniformly from the pool, with no bias toward "likely" values. It does not, by itself, defeat brute force: the size of the search space is pool size ^ length, or in bits, length × log2(pool size). With all four character types enabled the pool is 91 characters (26 lowercase + 26 uppercase + 10 digits + 29 symbols), so an 8-character random password is only 8 × log2(91) ≈ 52 bits, while a 16-character one is 16 × log2(91) ≈ 104 bits — double the length, but the search space is 252 times larger, not merely double. Randomness makes every character in the string count fully toward that entropy; it doesn't change how many characters you need.

Random password vs. PIN vs. passphrase — pick the right tool

A numeric-only PIN belongs on device lock screens and payment cards, where hardware locks the input after a few wrong attempts — it should never be reused as an online account password, because a website has no such hardware backstop against unlimited guessing. A passphrase built from random dictionary words trades a little entropy density for memorability: six words from the EFF long wordlist give about 78 bits, somewhat below a 16-character random string's ~104 bits, but far easier to type by hand. This generator is aimed at the case where you don't need to memorize the result — for example, storing it in a password manager — and want the maximum entropy per character the character set allows.

Password length comparison: 12 vs. 16 vs. 20 characters

Entropy assumes all four character types enabled (91-character pool)
Length Entropy (bits) Practical guidance
12 ≈78 Minimum reasonable floor for a random password; avoid for high-value accounts
16 ≈104 Strong everyday default; accepted by nearly every site — see the 16-character generator
20 ≈130 Recommended for password managers, primary email, financial and crypto accounts

Common mistakes that undo a random password

Frequently asked questions

Does this generator use Math.random()?

No. It uses the browser's Web Crypto API (crypto.getRandomValues), which is designed for security-sensitive randomness. Math.random() is not cryptographically secure and is never used here.

Could two people ever get the same random password?

It is possible in theory but astronomically unlikely for passwords of reasonable length, because each character is drawn independently from a large, uniformly distributed pool.

Is a random password the same as a strong password?

Randomness is one requirement for strength; length and character variety are the others. A short random password is still weaker than a long one.

Is a longer random password always better than a shorter complex one?

For randomly generated passwords, yes. Entropy is length × log2(pool size), so each extra character multiplies the search space by the pool size, while adding a whole new character type only adds a fraction of a bit per character. Length dominates.

Should I use this or the 16-character generator?

Both use the same cryptographically random engine. This page lets you adjust length and character sets freely; the 16-character generator is a fixed-length preset for the common case of a login that just needs one solid default.