Secure Random Password Generator – Free

This password generator builds a random password from letters, digits and optional symbols using the Web Crypto API. Passwords are created in your browser and are never transmitted or stored.

How to use the Password generator tool

  1. Enter the number of characters under Length, from 4 to 256.
  2. Choose Letters, digits and symbols or Letters and digits under Character set.
  3. Select Generate password. Select Example for a 24-character password with symbols.
  4. Select Copy and paste the password straight into your password manager.
  5. Select Generate password again for a different one; each run is independent.

How the password generator picks characters

Randomness comes from crypto.getRandomValues, the browser's cryptographically secure generator. Unlike Math.random, its output is designed to be unpredictable.

To choose a character, the tool draws a 32-bit random number and reduces it to an index. A plain remainder would favor some characters slightly, because 2^32 is not a multiple of 74 or 62. The code discards draws from the uneven tail and tries again, a technique called rejection sampling, so every character is equally likely.

The password starts with one guaranteed character from each class in the chosen set: lowercase, uppercase, digit and, if selected, symbol. The remaining positions are filled from the full set, and the result is shuffled with a Fisher-Yates shuffle driven by the same random source, so the guaranteed characters do not sit at the front.

Character sets and length

The two options differ only in the symbol group. Letters and digits gives 62 possible characters, and adding symbols gives 74. Length must be a whole number from 4 to 256.

The symbol list is limited to twelve characters that sign-up forms commonly accept; quotes, spaces, brackets and backslashes are left out. If a site rejects one of the symbols, switch to Letters and digits and add a few characters of length.

Lowercase  abcdefghijklmnopqrstuvwxyz
Uppercase  ABCDEFGHIJKLMNOPQRSTUVWXYZ
Digits     0123456789
Symbols    !@#$%^&*_-+=

How strong is a generated password

Strength is measured in bits of entropy: length times log2 of the set size. Each character from the 74-character set adds about 6.21 bits, and each from the 62-character set about 5.95 bits. Requiring one character of each class removes a small fraction of combinations, so treat the figures below as close estimates.

For comparison, AES-128 keys have 128 bits, so a 24-character password from either set exceeds that.

  • 12 characters with symbols: about 74.5 bits.
  • 16 characters with symbols: about 99 bits.
  • 24 characters with symbols: about 149 bits.
  • 24 letters and digits: about 143 bits.
  • 32 letters and digits: about 190.5 bits.

Using generated passwords well

A random 24-character string is not meant to be memorized. Store it in a password manager, use a different one for every account, and turn on two-factor authentication where it is offered. For the few secrets you must type by hand, such as a disk-encryption passphrase, a long phrase of random words is easier to enter than mixed symbols. This tool does not generate passphrases.

Frequently asked questions

Are the generated passwords saved or sent anywhere?

No. The password is produced by JavaScript in your browser and shown in the Result box. The tool sends nothing and keeps no history, so once you clear the form or close the tab the password is gone.

What is the shortest and longest password I can generate?

The Length field accepts whole numbers from 4 to 256. Four is the minimum because the default set guarantees one lowercase letter, one uppercase letter, one digit and one symbol. Decimal values are rejected with an error.

Which symbols can appear in the password?

Twelve: exclamation mark, at sign, hash, dollar, percent, caret, ampersand, asterisk, underscore, hyphen, plus and equals. They are listed in the character table above. Choose Letters and digits to leave them out.

Does every password contain a digit and an uppercase letter?

Yes. One lowercase letter, one uppercase letter and one digit are always included, plus one symbol when the symbol set is selected. Their positions are random because the whole password is shuffled after it is assembled.

Can I exclude look-alike characters such as O and 0?

Not in this tool. There is no option to remove ambiguous characters or to supply a custom alphabet. If you have to read a password aloud, generate one from Letters and digits and check similar glyphs carefully.

Related tools