GlobalKit

Password Generator

Generate one or several random passwords with your browser's cryptographic random source. Pick the length and character sets and see the exact entropy. Nothing leaves your device.

Whole number from 4 to 128.

Whole number from 1 to 20.

Include lowercase letters.

Include uppercase letters.

Include digits.

Include symbols from the list below.

Removes i, l, 1, L, o, 0 and O, which are easy to confuse when read or typed.

Each password contains at least one character from every selected set. This slightly lowers the entropy; the figure shown accounts for it.

Printable ASCII symbols only; letters, digits and spaces are not allowed. Duplicates are ignored.

Passwords are generated in your browser. They are never sent to a server and never stored.

How it works

A password from this page has the length you choose. Each character is drawn independently and uniformly from a pool: the union of the sets you switched on. The sets are lowercase a-z (26 characters), uppercase A-Z (26), digits 0-9 (10) and symbols (23 by default, listed below). Duplicates are removed, and the pool size in the result is the number of distinct characters.

Where the randomness comes from. The only source is crypto.getRandomValues, the browser's cryptographic random generator from the Web Crypto API. The ordinary, non-cryptographic Math generator is never used; the tool's tests check its source code for that.

No modulo bias. The generator gets random bytes, numbers from 0 to 255. Picking one of n characters with a plain remainder is unfair unless n divides 256 evenly. With a pool of 7, 256 = 36 × 7 + 4, so the byte values 0 to 3 would each be reachable 37 times and 4 to 6 only 36 times: some characters would show up slightly more often. The tool avoids this by rejection: every byte at or above 252 is thrown away and a new one is drawn. For a pool of 62 the cut-off is 248. One byte per draw is enough for any pool up to 256 characters. Every accepted value is then equally likely, and on average fewer than two draws are needed per character.

Require every selected set. When this is on (the default), a finished password that lacks a character from any selected set is discarded and generated again from scratch. The tool does not place one character from each set and then shuffle, because that would make some valid passwords more likely than others and the entropy could no longer be stated exactly. Re-drawing keeps all valid passwords equally likely.

Entropy. For a uniform choice among N possible passwords, entropy is log2(N) bits. With the requirement off, N is the pool size raised to the length, so the entropy is length × log2(pool size). With it on, N is the exact number of strings of that length that contain at least one character from every selected set, counted by inclusion-exclusion. The figure assumes an attacker who knows your options but not the password.

Strength labels. Below 28 bits is "Very weak", 28 to below 36 "Weak", 36 to below 60 "Fair", 60 to below 128 "Strong", and 128 or more "Very strong". These cut-offs are this site's own editorial convention, not a standard, and they say nothing about where you will use the password.

The default symbols are !@#$%^&*()-_=+[]{};:,.?. Quotes, backslash, space, angle brackets, slash, pipe, tilde and backtick are left out of that list; you can type any printable ASCII symbol into the symbols field yourself.

Examples

The entropy figures are length × log2(pool). Requirement off unless stated.

SettingsPoolEntropyLabel
Digits only, 6 characters1019.93 bitsVery weak
Digits only, 10 characters1033.22 bitsWeak
Lowercase only, 8 characters2637.60 bitsFair
Two symbols (! and #) only, 40 characters240.00 bitsFair
Letters and digits, 12 characters6271.45 bitsStrong
Letters and digits, 21 characters62125.04 bitsStrong
Letters and digits, 22 characters62130.99 bitsVery strong
All four sets, 16 characters85102.55 bitsStrong
Digits and lowercase, 4 characters, requirement on3620.21 bits (20.68 with it off)Very weak

The last row is the exact count: 36⁴ − 26⁴ − 10⁴ = 1,212,640 valid passwords, and log2 of that is 20.21, against 4 × log2(36) = 20.68 with the requirement off. With all four sets and 16 characters, turning the requirement on lowers the figure by only a fraction of a bit (about 0.2), because almost every random password already contains all four kinds.

A draw, step by step. Digits only, length 4, pool of 10, so the cut-off is 250. Suppose the random bytes are 252, 3, 255, 17, 200, 9. The bytes 252 and 255 are at or above 250 and are discarded. The rest give 3, 17 mod 10 = 7, 200 mod 10 = 0 and 9: the password is 3709.

Re-drawing for the requirement. Lowercase plus digits, length 4. A first draw that comes out as abcd has no digit, so it is discarded; the next draw abc0 has both kinds and is kept.

Excluding look-alikes. With all four sets, the pool goes from 85 to 78 characters (23 lowercase, 24 uppercase, 8 digits, 23 symbols).

Things to watch for

Frequently asked questions

Last updated: 10/11/2026

Related tools