Password Generator

Generate strong random passwords or memorable passphrases using the browser's cryptographic random generator, with entropy shown in bits.

Loading tool…

Passwords are generated on your device with crypto.getRandomValues(). Nothing is requested from or sent to a server, and nothing is stored.

What the Password Generator does

This password generator will generate strong random passwords or memorable passphrases using the browser's cryptographic random generator, with entropy shown in bits. Everything runs inside this page, so the work happens on your own device rather than on a server. It is most often used for creating a unique password for a new account. You may also want the password strength checker.

How to use it

  1. Choose a password or a passphrase.
  2. Set the length or word count and which character sets to include.
  3. Generate as many as you need.
  4. Copy one straight into your password manager.

How it works

Randomness comes from crypto.getRandomValues(), the browser's cryptographically secure generator. Math.random() is not used anywhere here — it is fast but predictable, and a password generated from it can be reconstructed by anyone who knows the generator state.

Character selection uses rejection sampling rather than a simple modulo of a random number. Modulo introduces a bias toward the earliest characters in the set when the set size does not divide evenly into the random range, which measurably reduces the real entropy. Rejecting and redrawing avoids that.

Entropy is reported in bits, which is the honest measure of strength: it is log2(alphabet size) × length, and it tells you how many guesses an attacker needs on average. A 16-character password from the full printable set carries about 104 bits, which is beyond any feasible brute-force attack. Below about 50 bits, assume it can be cracked by someone motivated.

Passphrases trade length for memorability. Four random common words carry roughly 50 bits and are far easier to type on a phone or remember for the handful of passwords you cannot store in a manager — your device login and the manager's own master password.

When to use it

  • Creating a unique password for a new account.
  • Generating a memorable master password for a password manager.
  • Producing a batch of credentials for test accounts.

Common mistakes to avoid

  • Reusing one strong password across sites — a breach at one then compromises all of them.
  • Substituting characters in a dictionary word (p@ssw0rd), which cracking tools expand automatically.
  • Choosing a short password because a site caps the length; use the full length allowed.

Frequently asked questions

How long should a password be?

Sixteen characters from a mixed set is comfortably beyond brute force, and longer costs nothing when a password manager types it for you. For anything you must type yourself, a four or five-word passphrase is easier and still strong.

Are these passwords really random?

Yes. They come from crypto.getRandomValues(), the browser's cryptographic generator, with rejection sampling to avoid modulo bias. Nothing here uses Math.random().

Is it safe to generate a password on a web page?

Generation happens entirely on your device and nothing is transmitted, which you can verify in your browser's network tab. The residual risk is local: browser extensions can read page content. For your most critical credentials, generate inside your password manager instead.

Related tools

See all security & privacy tools →