Random Password Generator
GeneratorsEverything runs locally in your browser — nothing is uploaded
Entropy = length × log2(charset size), assuming every character is drawn independently and uniformly. With “No repeating characters” the draw is without replacement, so the bits are computed from size×(size−1)×… instead of overstating.
Password strength is computable: entropy equals length multiplied by log2 of the character set size, measured in bits, where n bits means an attacker needs about 2^(n-1) attempts on average. This page shows that number instead of just calling a password strong, because numbers can be compared and reasoned about: raise the length from 8 to 16, or the character set from 26 to 86, and you can watch the entropy change. Two guarantees hold on the generation side: randomness comes only from the browser crypto API, and every selected character class appears at least once before the whole string is shuffled.
Features
- Four one-click presets — general password, PIN (digits only), letters + digits, easy to copy by hand — or tick the sets yourself
- Length from 4 to 128, with lowercase, uppercase, digits and symbols each optional
- Live entropy readout in bits, recalculated as you change any option
- Every selected character class is guaranteed to appear at least once, then the result is shuffled, so no position is stuck on one class
- Optionally exclude the look-alikes 0 O 1 l I, useful when a password has to be copied by hand or read aloud
- Optional no-repeat mode where each character appears at most once; the length is then capped at the charset size and the entropy is recomputed without replacement, so it is never overstated
- Generate up to 100 passwords at once, guaranteed distinct, copied individually or all together
- Anything matching the common-password list is flagged per row rather than quietly passed through
How to use
- Pick a preset (choose PIN for digits only), or tick the character sets yourself
- Set the length, 16 or more is a good default
- Tick the look-alike exclusion if the password has to be typed by hand, or no-repeat if every character must differ
- Click Generate again for a new batch, then Copy on any row
FAQ
- What is entropy and how much is enough?
- Entropy measures how many attempts an attacker needs on average, in bits: n bits means roughly 2^(n-1) tries. As a rule of thumb, anything under 40 bits falls to a single graphics card in hours, 60 bits and up resists online guessing, and 80 bits and up is out of reach for current hardware. All four character sets at length 16 give about 105 bits, which is the number shown on the page. Unlike the word strong, it can be compared directly.
- Are generated passwords stored or uploaded?
- No. Randomness comes from crypto.getRandomValues, a cryptographically secure source, and generation and display both happen in memory on your machine. The page makes no network requests, and reloading clears the list, so nothing ends up in a server log.
- Why can Math.random not be used for passwords?
- It is not a cryptographically secure source. Its internal state can be recovered from a few hundred outputs, after which every generated password becomes predictable, and the mistake raises no error at all: the generator looks perfectly healthy. This tool, like every tool on this site that needs randomness, uses crypto.getRandomValues only.
- Will a batch of 100 contain duplicates?
- No. Any password that repeats within a batch is discarded and regenerated. With the current ranges, a length of at least 4 and a character set of at least 8 characters, producing 100 distinct values is never a problem.
- How do I generate a numeric PIN?
- Pick the PIN preset and the character set drops to 0–9. Bear in mind that a short numeric code has little entropy: six digits is 20 bits and eight is 26.6, both inside the range a few hours of guessing covers. A PIN is only appropriate where the number of attempts is limited — a phone lock screen, a bank card — because three wrong tries ends the game there and the cost is not compute. Anywhere a numeric string can be tried unlimited times, such as a website login, six digits is nowhere near enough.
- What does no-repeat mean, and why does the length shrink?
- It means no character appears more than once anywhere in the password, so `aab7` cannot happen. That caps the length at the size of the character set — ten digits means at most ten positions — and the page narrows the length field accordingly and tells you the new limit. The displayed entropy shrinks too: sampling becomes without replacement, so the keyspace is `size × (size−1) × …` rather than `size^length`. Ten distinct digits carry 10! ≈ 21.8 bits, not the 33.2 bits the naive formula gives, and those missing 11 bits are real, so the smaller figure is the one shown.
- What should I do with the password afterwards?
- Use one per account, never reuse them, and store them in a password manager rather than a chat message. If a site rejects symbols, drop symbols and add length instead, since length buys more entropy than symbols do. When a site imposes a maximum length, generate at that maximum and keep the character sets wide.
Related tools
UUID Generator
GeneratorsGenerate a column of UUID v4, v7, ULID, NanoID or MongoDB ObjectId values, one per line, ready to paste into a spreadsheet. Runs in your browser.
QR Code
GeneratorsGenerate QR codes for text, links, WiFi, contact cards or calendar events, with adjustable colours, downloadable as PNG or vector SVG.
Lorem Ipsum
GeneratorsGenerate placeholder text as Latin lorem ipsum, English sentences, Chinese or Japanese filler, in paragraphs, sentences or words — all in your browser.
Mock Data
GeneratorsDescribe your fields once and get realistic mock records, exportable as JSON, CSV, TSV, SQL, XML, YAML or TOML. All generated in your browser.
Random Chinese Characters
GeneratorsGenerate random strings of Chinese characters from a common pool of about 850, or the full basic CJK block. Runs entirely in your browser.
Serial Number Generator
GeneratorsGenerate sequential serial numbers or random license keys: prefix, suffix, start, step, zero padding, and X/A/N key patterns.