Password Generator

Generate secure, random passwords with custom settings.

Security Tip

A strong password should be at least 12 characters long and include a mix of letters, numbers, and symbols.

How to use

Set your desired length with the slider, choose which character types to include, and click Generate. Click the refresh icon to generate a new one with the same settings, or copy the result directly.

  • Set your desired password length using the slider (4–64 characters).
  • Toggle which character types to include: uppercase, lowercase, numbers, symbols.
  • Click Generate to create a password using the Web Crypto API.
  • Click the refresh icon to generate a new one with the same settings, or copy the result.
Advertisement
AdSense Placeholder

About Password Generator

Password Generator creates a random password using whichever character sets you enable — uppercase, lowercase, numbers, and symbols — at a length you choose from 4 to 64 characters. Character selection uses the Web Crypto API's cryptographically secure random number generator, rather than Math.random(), which is not designed for security-sensitive values. Generation runs entirely in your browser, so the password is never sent anywhere before you see it.

What Makes a Strong Password?

Password strength mostly comes down to how many possible passwords an attacker would have to guess before finding the right one — a property called entropy. Length contributes far more to this than character variety does: adding four more characters to a password increases the guessing space more than adding symbols to a shorter one. That's why a longer password using just letters and numbers can be stronger than a short one packed with symbols.

The other factor that matters is unpredictability. A password generated by a genuine random process, like this tool's, has no pattern an attacker could exploit — unlike a password a person chooses by hand, which tends to follow patterns (real words, predictable substitutions, personal details) that make it easier to guess than its length alone would suggest.

How This Generator's Randomness Works

Each character is selected using the Web Crypto API's crypto.getRandomValues(), not Math.random(). To avoid a subtle statistical bias that a naive implementation would introduce — where some characters would be selected very slightly more often than others — this tool uses rejection sampling: it draws a random value and discards it if it falls in a range that wouldn't map evenly onto the character set, then draws again.

If you've enabled multiple character types, one character from each enabled type is drawn first to guarantee it appears, and the rest of the password is filled from the full combined set. The whole result is then shuffled using a Fisher-Yates shuffle — also driven by the same secure randomness — so the guaranteed characters don't end up predictably placed at the start.

Common Use Cases

  • Creating a one-off password for a new account or service.
  • Generating a password that meets a specific site's length or character requirements by toggling the relevant options.

Tips

Length matters more than complexity for resisting brute-force guessing — a longer password with fewer symbol requirements is generally stronger than a short one packed with special characters.
Because generation happens locally, closing or refreshing the page means the password is gone for good if you didn't copy it — there's no history to recover it from.

Frequently Asked Questions

Is this password generator cryptographically secure?

The randomness used to select each character comes from the Web Crypto API (crypto.getRandomValues()), the same source browsers use for cryptographic operations — not Math.random(), which isn't designed for security-sensitive values. That covers the randomness itself; how you store and use the resulting password is still up to you.

Are all four character types guaranteed to appear?

Yes — if you enable multiple character types, at least one character from each enabled type is guaranteed to appear in the generated password, not left to chance. Their positions are then shuffled so they don't predictably cluster at the start.

Related Tools

Related Guides