Password Generator

About this calculator

The Password Generator creates random passwords in your browser using the cryptographic random source built into your device. Choose the length and the kinds of characters, exclude look-alike characters or brackets, and forbid repeats. The default is a 10 character password with ambiguous characters and brackets excluded.

Each result comes with an entropy estimate in bits and a strength label, plus a copy button. Nothing is sent over the network.

Embed this calculator

Paste this code into a Custom HTML block on your site. The calculator fits the width of the block. Adjust the height in the code if you want more room for results.

Find this widget in the publisher directory

How the generator builds a password

You pick a length and a set of character types. The generator builds a pool from the types you selected, draws each character with your browser's cryptographically secure random number source, and makes sure the password contains at least one character from every selected type. The characters are then shuffled so those guaranteed picks do not sit in predictable positions. Because the draws use rejection sampling, every character in the pool is equally likely, with no modulo bias.

What the options do

  • Lowercase, uppercase, numbers, symbols: each adds its characters to the pool. Mixing all four gives a pool of 93 characters (26 + 26 + 10 + 31 symbols).
  • Exclude ambiguous characters: removes characters that are easy to confuse when read or typed: i, l, o, I, L, O, the digit 0 and the bar |, along with a few punctuation marks that are easy to mistake or mis-enter. Useful when you must read a password aloud or type it from paper.
  • Exclude brackets: removes the characters < > ( ) [ ] { }, which some systems and shells treat specially.
  • No repeated characters: every character appears at most once. This slightly reduces entropy but is sometimes required by old policies.

Password entropy

Entropy measures how many guesses an attacker would need. For a password of length L drawn from a pool of N characters, with repeats allowed, there are NL possibilities, so:

entropy (bits) = L × log2(N)

With no repeats allowed, the choices shrink at each position, so the entropy is the sum of log2(N), log2(N-1), log2(N-2) and so on. On average an attacker must try about half of all possibilities, which is one bit less than the entropy figure suggests.

Worked example

A 16 character password using all four types has a pool of 93 characters. Its entropy is 16 × log2(93) = 16 × 6.539 = 104.6 bits, which means roughly 2105 possibilities. The default 10 character password, with ambiguous characters and brackets excluded, draws from 68 characters and has 10 × log2(68) = 60.9 bits. A 10 character password using only lowercase letters has 10 × log2(26) = 47.0 bits. Length helps more than complexity: adding one character to a 93 character pool adds 6.5 bits, while adding the symbol set to a lowercase pool of 26 adds only about 1.9 bits per position.

Strength guide

EntropyLabelMeaning
Under 36 bitsVery WeakFalls to a quick guessing run
36 to 47 bitsWeakOnly safe with strict lockouts
48 to 59 bitsGoodFine for low-value accounts
60 to 119 bitsStrongResists offline attacks for years
120 bits and upVery StrongBeyond any practical attack

Using passwords safely

  • Use a different password for every account, and keep them in a password manager.
  • Prefer long random passwords. Sixteen characters or more is a good default.
  • Turn on two-step verification wherever it is offered.
  • Never build a password from names, dates, or words you use elsewhere.
  • Excluding ambiguous characters is convenient but trims a little entropy, so add a few characters of length to compensate.

Why this is safe to use

Everything runs on your device. The page asks your browser for random numbers, builds the password locally and shows it to you. There is no server round trip, so no one else sees what you generate. Even so, treat the page like any other app: close the tab when you are done and avoid leaving generated passwords in screenshots or shared documents.

Choosing a length

For most online accounts, 12 to 16 random characters is a sensible minimum. For the master password of a password manager, a disk encryption key or a cryptocurrency wallet, go to 20 characters or more. If you have to memorize a password, a long passphrase of several unrelated words is easier to remember than a short string of symbols and can be just as strong. Use this generator for anything you can store in a manager, and keep the shorter, memorable secrets for the few places where you cannot.

What this tool does not do

A generator cannot protect you from phishing, from malware on your device or from a website that stores passwords badly. It also cannot check whether a password has leaked elsewhere, though a freshly generated random password is extraordinarily unlikely to appear in any breach list. Pair strong passwords with two-step verification for the best protection.

Frequently asked questions

How long should a password be?
Sixteen random characters from all four types give about 104.6 bits of entropy, which is strong for almost any account. Use even longer ones for a password manager master password.
Is this password generator safe?
Yes. It uses your browser’s cryptographic random source and runs entirely on your device, so the passwords are never transmitted or stored.
What does entropy in bits mean?
Entropy is the base 2 logarithm of the number of equally likely passwords. Every extra bit doubles the number of guesses an attacker needs.
Why exclude ambiguous characters?
Characters like l, I, O and 0 look alike in many fonts, as do some punctuation marks. Excluding them avoids typing mistakes when you must read a password from a screen or paper.
Does forbidding repeats make a password safer?
No. It slightly reduces the number of possible passwords, so entropy drops a little. Only use it if a system requires it.

Formulas and sample results on this page were checked against independent references. Page last reviewed or updated . How we verify calculators. Project led by Shaun Connell.