oktools

Password Generator

Generate a strong random password of any length from your browser’s cryptographic random source. Nothing is generated on a server and nothing is stored — the password exists only on this page and on your clipboard.

Password Strength

Very Strong
Entropy: 95 bits
Password Length
16
416324864

Character Types

Lowercase Letters (a-z)0Always On
For maximum security, use at least 16 characters with all character types enabled.

How it works

The generator starts from the sets you have switched on: lowercase a–z, which is always included, then uppercase A–Z, the digits 0–9 and a 32-character set of punctuation. With Exclude ambiguous characters ticked, 0, O, 1, l, I and | are removed from whichever sets contain them before anything is drawn. One character is taken from each enabled set first, the remaining positions are filled from all the enabled sets joined together, and the result is shuffled with a Fisher–Yates pass so the guaranteed characters do not sit at the front. Every enabled set is therefore present at least once.

Every draw is a 32-bit value from crypto.getRandomValues, reduced to an index with rejection sampling: values at or above the largest multiple of the set size that fits in 32 bits are thrown away and drawn again, so taking the remainder cannot favour the first few characters of a set. The shuffle takes its swap positions from the same source. The prerendered page carries no password at all; the first one is generated by your browser once the page has loaded, so no two visitors are shown the same starting password and nothing is baked into the static HTML. Regenerate repeats the whole procedure with the current settings.

The strength meter is computed from the settings rather than from the password on screen: floor(length × log2(set size)), where the set size is 62 for the default letters and digits, 94 with symbols on, and 57 or 88 once the six ambiguous characters are excluded. The figure is therefore already right before the first password exists, and it does not jump between two passwords generated with the same settings. The counts in the stats row are different: they are read from the actual password, one regular expression per class, so one 16-character draw might show 6 uppercase, 6 lowercase and 4 numbers and the next something else.

Examples

Generate a default password

One real draw with the page’s starting settings; every run differs. The set is 62 characters, so the meter reads 95 bits and Very Strong, and the stats row for this particular password counts 6 uppercase, 6 lowercase and 4 numbers.

Settings
Length: 16
Uppercase: on
Lowercase: always on
Numbers: on
Symbols: off
Exclude ambiguous characters: off
Password
cM4q7VcIZ0kJJ8ko

Add symbols and length for a master password

Six of the twenty characters came out as symbols, but only one of them was guaranteed: the generator promises at least one from each enabled set and leaves the rest to chance. Ninety-four characters at length 20 is 131 bits.

Settings
Length: 20
Symbols: on
Everything else as default
Password
rSgrh$N6FB*@RdJ&j_h&

Leave out characters that look alike

No 0, O, 1, l, I or | can appear, which is what makes a password safe to dictate or copy from paper. The set shrinks from 94 to 88 characters, so the meter reads 155 bits rather than 157; the extra length more than pays for it.

Settings
Length: 24
Symbols: on
Exclude ambiguous characters: on
Password
Dfp)U5\Lr7cM4\]dGZK'w9Nk

See why a short password is rated Weak

Eight characters from a 62-character set is 47 bits, which the meter labels Weak. This draw also happens to contain both a zero and a capital O, the very pair Exclude ambiguous characters exists for.

Settings
Length: 8
Everything else as default
Password
0bn7GbOY

Supported formats

  • Length from 4 to 64The slider runs from 4 to 64 characters and starts at 16. The output is a single line of printable ASCII with no spaces, so it pastes cleanly into a terminal, a form field or a configuration file.
  • Four character setsLowercase a–z (26, always on), uppercase A–Z (26), digits 0–9 (10) and the 32 symbols !@#$%^&*()_+-=[]{}|;:,.<>?/~`"'\ — all four together are the 94 printable ASCII characters other than space.
  • Ambiguous-character exclusionRemoves 0, O, 1, l, I and | from the sets that contain them, leaving 25 lowercase, 24 uppercase, 8 digits and 31 symbols: 88 characters in total, or 57 with symbols off.
  • Entropy readoutfloor(length × log2(set size)), shown as a whole number of bits under the strength bar and recomputed the moment a slider or toggle changes, before the new password is even drawn.
  • Clipboard copyCopy puts the exact characters on the clipboard and flashes the display. The button reads Copied for two seconds, or Copy failed when the browser refuses, which happens in an unfocused tab or when clipboard access has been denied.

Use cases

  • Application secrets and signing keysSet the length to 64 with letters and digits for a session secret or a token-signing key: 381 bits, and nothing a shell, a URL or a YAML file needs escaping. Switch symbols on only where the consumer is known to accept them.
  • A password-manager master passwordTwenty or more characters with every set on. It is the one password the manager cannot store for you, so this is where a long random one earns its keep.
  • Credentials that have to be read aloud or typed from paperWi-Fi keys, meeting-room logins and a temporary password given over the phone: tick Exclude ambiguous characters, leave symbols off and add two characters of length to make up the difference.
  • Database and service-account passwordsGenerate at 32 characters for accounts no human types. Where a connection string will hold the value, leave symbols off so that @, : and / cannot be mistaken for the URL’s own delimiters.
  • Testing a password policyToggle sets off to produce passwords that deliberately lack digits or symbols and check that a sign-up form rejects them, then ones that include every class at the shortest length the policy allows.

Limitations

  • No passphrasesIt produces character strings only, not word-based passphrases of the correct-horse-battery-staple kind. For something memorable, roll words from a diceware list; six words from the standard 7,776-word list are about 77 bits.
  • Only whole sets can be toggledThere is no way to demand exactly two digits, forbid a particular symbol or supply a custom alphabet for a system with rules of its own. For a site that rejects a character, regenerate or switch symbols off.
  • 64 characters at mostThe slider stops at 64. For longer tokens or raw key material, generate bytes directly with openssl rand -hex 32 or openssl rand -base64 48 rather than a password-shaped string.
  • Nothing is rememberedThe password exists only on screen and, once copied, on the clipboard; leaving the page or pressing Regenerate loses it. Save it to a password manager before closing the tab, because this page is not one.
  • No fallback random sourceEvery character comes from crypto.getRandomValues and there is no fallback to Math.random, by design: without the Web Crypto random source, which no current browser lacks, the generator fails rather than produce a predictable password.

Frequently asked questions

How long should a password be?

Sixteen characters is a sensible floor for an account that matters, and 20 or more for a password manager master password or anything protecting money or infrastructure. Length buys far more strength than exotic characters do: each extra character multiplies the number of guesses an attacker has to make, which is why the entropy figure under the strength bar climbs faster when you drag the slider than when you switch on symbols.

Are these passwords really random?

Yes. Each character is drawn from your browser’s cryptographic random number source, crypto.getRandomValues, using rejection sampling so that every character in the set is equally likely. One character from each enabled type is drawn first, so a password never comes out missing the digits or symbols you asked for, and the whole thing is then shuffled with the same source. Math.random, which many generators use, is not designed to be unpredictable and is not used here.

Is it safe to use an online password generator?

It depends entirely on where the password is generated. This one generates it on your device: the page makes no network request when you press Regenerate, so the password exists only in your browser and on your clipboard. A generator that builds the password on a server has by definition seen it, and you have no way to check what it did with it.

What does the entropy figure mean?

It is the number of bits of randomness in the password, worked out from its length and the size of the character set it was drawn from, and it is what the strength label is based on: below 40 bits is Very Weak, Weak up to 60, Strong up to 80 and Very Strong from 80 bits. Every extra bit doubles the number of guesses needed to brute-force it, so a password under 40 bits falls to an offline attack in minutes on modern hardware, while 80 bits and up is comfortable for anything short of a nation-state adversary.

Why are lowercase letters always on?

Because a password needs at least one character set to be drawn from, and lowercase is the one every system accepts. Leaving it switchable would let you build an empty character set and an impossible password, so it is fixed and marked Always On instead.

Should I turn on symbols?

Turn them on where the system accepts them — they widen the character set from 62 to 94, which is worth roughly ten extra bits on a 16-character password. Some older systems silently truncate or reject punctuation, so if a login mysteriously fails, switch symbols off and add two characters of length instead; you end up at about the same strength. If a password has to be read aloud or typed from paper, tick Exclude ambiguous characters to leave out 0, O, 1, l, I and |; that costs about two bits at 16 characters, which one extra character more than pays back.

Are the generated passwords stored or sent anywhere?

No. The whole tool is JavaScript running in your own browser, so nothing you type or paste is sent over the network, written to a log or attached to an analytics event. You can confirm it by opening the network tab and watching it stay empty while you work.