Free developer tool

Generate a random password on your device with the browser's crypto source

A strong password generator for anyone setting up a new account, a database user or a Wi-Fi network. Each character is drawn with crypto.getRandomValues in your browser; the password is never sent or saved.

crypto.getRandomValues, not Math.randomLength 8 to 64, default 18Exact symbol set: !@#$%^&*()-_=+
Password Generator

Set the length and the character sets, then generate. Copy the password from the panel below straight into your password manager.

Runs on your device
Password
Your password appears here.

What the Password Generator does

Password Generator shows a password the moment the tool opens: 18 characters drawn from lowercase letters, uppercase letters, digits and symbols. A slider sets the length anywhere from 8 to 64, three checkboxes switch uppercase, numbers and symbols on or off, and Generate produces a fresh one. Lowercase letters are always in the pool. The Copy button puts the password on the clipboard and changes its label to Copied.

Every character is chosen independently. The tool asks crypto.getRandomValues for one 32-bit random value per position and uses it to pick a character from the pool. The Web Crypto API specifies this as a cryptographically strong source seeded from the operating system, which is the difference between this and the many generators built on Math.random, a function MDN explicitly says not to use for anything related to security.

With all four sets on, the pool holds 76 characters: 26 lowercase, 26 uppercase, 10 digits and the 14 symbols !@#$%^&*()-_=+. Each character from that pool contributes about 6.25 bits of entropy, so the default 18-character password carries about 112 bits, and the shortest lowercase-only password, 8 characters from 26 letters, carries about 38 bits. Those figures are properties of the settings, not promises about any particular website.

The tool does not enforce composition. Because each position is drawn independently, a short password can come out with no digit or no symbol even when those boxes are ticked. It also offers no passphrase mode, no exclusion of look-alike characters and no strength meter. It generates; a password manager is where the result should live.

How to use it

Set the length

Drag the slider between 8 and 64. NIST's current guidance puts the minimum for a password used on its own at 15 characters, so 16 or more is a sensible default when the site allows it.

Choose the character sets

Untick Symbols for a site that rejects punctuation, or Numbers and Uppercase for a system that wants letters only. Lowercase letters stay in the pool whatever you choose.

Generate, copy and store it

Press Generate, then Copy. Paste it into the sign-up form and into your password manager straight away; the page keeps no record and the password is gone on reload.

How each character is chosen

The generator builds a string of the allowed characters, fills an array of 32-bit unsigned integers, one per position, with crypto.getRandomValues, and maps each integer to a character by taking the remainder when divided by the pool size. Because the pool size never divides 2 to the power 32 exactly, 44 of the 76 characters are selected very slightly more often than the rest. The difference is on the order of one part in fifty million and has no practical effect on guessability, but it is worth knowing if you are auditing the method.

crypto.getRandomValues is available in every current browser and in secure and insecure contexts alike, so the tool works over plain HTTP as well as HTTPS. The values are produced by a pseudorandom generator seeded from the operating system's entropy source, which the Web Crypto specification requires to be suitable for cryptographic use. Nothing about the generated password is written to local storage, cookies or a server.

How strong the result is, in numbers

Entropy measures how many equally likely passwords a setting can produce, expressed as bits. Each character from a pool of n characters adds log2(n) bits: about 4.7 bits from 26 lowercase letters, about 5.95 from the 62 letters and digits, and about 6.25 from the full 76-character pool. Multiply by the length to get the total. Twelve characters from the full pool give about 75 bits, sixteen give 100, the default eighteen give about 112, and the maximum of 64 gives about 400.

Length beats variety. Adding the 14 symbols to a letters-and-digits pool raises each character from 5.95 to 6.25 bits, a gain of less than one bit per character, whereas adding one more character adds a full 6.25 bits. If a site forbids symbols, untick them and make the password two characters longer; you will end up stronger than before. Against an attacker guessing offline, every extra bit doubles the work.

  • 8 characters, lowercase only: about 38 bits
  • 12 characters, full pool: about 75 bits
  • 18 characters, full pool (the default): about 112 bits
  • 64 characters, full pool: about 400 bits

What NIST and OWASP recommend

NIST Special Publication 800-63B, the US federal guideline for digital identity, says that passwords used as a single factor must be at least 15 characters, that passwords used alongside a second factor may be as short as 8, and that services should allow at least 64 characters and accept every printing ASCII character and the space. It also tells services not to impose composition rules such as requiring a symbol, and not to force periodic changes unless a password is known to be compromised. The OWASP Authentication Cheat Sheet carries the same thresholds.

For you as a user, the practical reading is: generate something long, let a password manager remember it, use a different one for every account, and turn on a second factor wherever it is offered. A site that caps passwords at 12 characters or rejects a symbol is working against those guidelines, and the fix is to shorten or adjust the generated password, not to reuse an old one.

Limits to know before you rely on it

  • The tool does not force at least one character from each selected set, so a short password can lack a digit or a symbol even when those boxes are ticked.
  • Lowercase letters are always included. There is no digits-only mode for PINs and no symbols-only mode.
  • The symbol set is fixed at !@#$%^&*()-_=+. You cannot add characters such as a space, slash or question mark, or exclude look-alikes such as l, 1, I, O and 0.
  • There is no passphrase or pronounceable-word mode and no strength meter; the entropy figures on this page are the only guide to strength.
  • Nothing is saved anywhere. The password disappears when you close or reload the page, so copy it into a password manager before leaving.
  • If your browser blocks clipboard access, the button label will not change to Copied; select the password text and copy it by hand.

Questions people ask about the Password Generator

How long should the password be?

At least 15 characters for a password that is the only thing protecting an account, which is NIST's current minimum, and longer whenever a password manager is remembering it for you. The default of 18 from the full pool gives about 112 bits of entropy. Go to the slider's maximum of 64 for anything a human will never type, such as a database or API password.

Is crypto.getRandomValues really random enough?

Yes for this purpose. It is the Web Crypto API's random source, specified to be cryptographically strong and seeded from the operating system, and it is what browser libraries use for key generation. The alternative, Math.random, is a fast general-purpose generator whose output can be predicted, which is why MDN warns against using it for security.

Why does my password have no symbol even though Symbols is ticked?

Ticking a set adds its characters to the pool; it does not reserve a position for them. Each character is an independent draw from the whole pool, so a short password can miss a set by chance. Generate again, or raise the length, which makes a missing set increasingly unlikely without weakening anything.

Does the site store or see the password?

No. The password is produced by JavaScript running on the page and exists only in the page's memory until you reload or close it. No request carries it to a server, nothing is written to local storage or a cookie, and the copy button uses your browser's clipboard directly.

Can I generate a numeric PIN or a word-based passphrase?

Not with this tool. Lowercase letters are always included, so a digits-only PIN is not possible, and there is no word list for passphrases. For a PIN, generate a password with Numbers on and take only the digits; for a passphrase, use a generator built around a word list such as Diceware.

Why does a website reject the generated password?

Usually because of a length cap, a banned symbol or a rule requiring at least one character of a type the random draw happened to miss. Shorten the slider to the site's maximum, untick Symbols if punctuation is refused, or simply generate again. If the site accepts the password but later login fails, it may have truncated it silently; try the first part.

Sources and further reading