Secure Password Generator
Create independent random passwords from 4 to 256 characters using the browser Web Crypto API. Choose lowercase letters, uppercase letters, numbers, symbols, and optional ambiguous-character filtering. Every result contains at least one character from each selected set, and the displayed search-space estimate reflects the generator's actual valid output set.
Every generated password contains at least one character from each of the 4 selected sets.
Choose the length and character sets, then generate one or more passwords.
How to Generate a Secure Random Password
Choose a password length from 4 through 256 characters.
Select lowercase letters, uppercase letters, numbers, symbols, or any supported combination.
Enable ambiguous-character filtering when the password may need to be read or typed manually.
Choose whether to generate 1, 5, or 10 independent passwords, then select Generate.
Copy the chosen result into a trusted password manager and assign it to only one account.
What This Generator Guarantees
Every returned character belongs to one of the selected character sets.
Every returned password contains at least one character from each selected set.
The generator does not satisfy that condition by inserting predictable characters into fixed positions.
Instead, it generates a uniformly random candidate from the complete pool and rejects the candidate when one or more selected sets are missing.
How each password is generated
Swipe horizontally to view the full table.
Available Character Sets
The full pool contains 86 distinct ASCII characters: 26 lowercase letters, 26 uppercase letters, 10 digits, and 24 symbols.
With ambiguity filtering enabled, the full four-set pool contains 80 characters.
The sets are disjoint, so each character belongs to exactly one enabled category.
The symbol collection is intentionally fixed. A service with a narrower symbol policy may require disabling symbols or manually checking compatibility.
Password character pools
Swipe horizontally to view the full table.
Cryptographic Browser Randomness
The generator obtains unsigned 32-bit values from crypto.getRandomValues rather than Math.random.
Web Crypto is designed to provide cryptographically strong random values using the browser and operating system's random-number facilities.
If secure browser randomness is unavailable, generation stops with an error instead of silently falling back to a weaker source.
How Rejection Sampling Avoids Modulo Bias
A random 32-bit value cannot always be divided evenly across a character pool.
Using value modulo pool size without correction can therefore make some character indexes slightly more likely than others.
The generator calculates the largest evenly divisible portion of the 32-bit range and discards values outside it.
The accepted values then map evenly to every character in the pool.
How Character-Set Coverage Stays Uniform
A common password-generation shortcut inserts one character from each required set and then shuffles the result.
That approach guarantees coverage but does not generally make every valid final password equally likely.
This implementation instead samples a complete candidate uniformly from the combined pool.
Candidates missing a selected set are rejected. Conditioning a uniform candidate process on the coverage rule leaves every accepted password equally likely.
What the Search-Space Result Means
Search-space bits are the base-2 logarithm of the number of different passwords this exact configuration can return.
A result of 128 bits means that the valid output set contains approximately 2¹²⁸ possible passwords.
Because every valid output is equally likely, this is a meaningful description of the generator's random output space.
It is still not a promise of cracking time. Real attacks depend on password reuse, breaches, service rate limits, password hashing, phishing, malware, and other controls.
Example valid search spaces
Swipe horizontally to view the full table.
Why the Simple L × log₂(C) Formula Is Not Used
For unrestricted independent selection from a pool of C characters, a length-L password has Cᴸ possibilities and L × log₂(C) bits.
This generator adds the condition that every selected character set must appear at least once.
That condition removes candidates that are composed entirely from only some of the enabled sets.
The implementation therefore counts valid passwords with inclusion–exclusion before converting the count to bits.
Length Usually Matters More Than Adding One More Character Type
Increasing length multiplies the output space once for every additional position.
Enabling another set can also enlarge the pool, but a few additional random characters often contribute more search space than a small pool change.
Choose the longest password the destination service reliably supports and store it in a password manager rather than shortening it for memorability.
The displayed bits allow configurations to be compared, but they should not be treated as a universal security score.
Character Sets Are Compatibility Controls
Current NIST verifier guidance says services should not impose mandatory character-composition rules on user-chosen passwords.
That guidance addresses password-policy design and predictable human behaviour.
This tool generates machine-random passwords, so the set controls are useful for matching a destination's accepted characters and ensuring requested categories appear.
Selecting every set is not automatically better than choosing a sufficiently long password from a smaller accepted pool.
Excluding Ambiguous Characters
Ambiguous-character filtering removes I, l, 1, O, 0, and o.
This can reduce transcription mistakes when passwords must be read from paper, spoken, or typed on another device.
Filtering reduces the full pool from 86 to 80 characters, so it slightly reduces the mathematical search space at the same length.
The reduction is usually modest compared with the benefit of adding one or more random characters.
Generating Several Passwords
A batch of 5 or 10 creates independent passwords using a new sequence of cryptographic selections for every result.
The passwords are not mutations, prefixes, or numbered versions of one another.
Batch generation is useful when preparing several separate test accounts, devices, vault entries, or temporary credentials.
Each result should still be assigned to only one account or purpose.
Store Generated Passwords in a Password Manager
Machine-generated passwords are intentionally difficult to remember.
A password manager can store a different long password for each service and fill it without requiring the user to memorize or repeatedly type it.
Current NIST guidance requires verifiers to allow password managers and autofill and recommends permitting paste when autofill is unavailable.
Protect the password manager itself with strong authentication, recovery controls, software updates, and an appropriate backup strategy.
Use a Different Password for Every Account
Password reuse allows a credential exposed by one service to be tested against unrelated services.
Generating a new independent value for every account limits the effect of one password disclosure.
Do not create a reusable base password and append the website name, year, or a predictable number.
Do not use one generated batch as a visible pattern for related accounts.
Passwords Are Not Phishing-Resistant
A long random password can resist guessing while still being stolen through a fraudulent sign-in page.
It can also be captured by malware, browser compromise, remote-access software, or an unsafe recovery process.
Use suitable multifactor authentication where available, especially for email, financial, administrative, developer, and password-manager accounts.
Authentication security depends on the complete account system rather than the generated string alone.
Threats a random password does and does not address
Swipe horizontally to view the full table.
Clipboard and Screen Handling
Copying makes password entry easier but moves the value into the operating-system clipboard.
Clipboard history, synchronization, remote-desktop software, browser extensions, or other local applications may retain or observe copied content.
Paste the password promptly into its intended destination and clear clipboard history when the device or environment requires it.
Avoid generating credentials while screen sharing, recording, streaming, or using an untrusted device.
When a Site Rejects the Generated Password
Some sites impose undocumented length limits or reject certain symbols.
First check the site's stated password requirements and reduce only the unsupported setting.
Prefer disabling an incompatible symbol set or shortening within the documented limit rather than repeatedly modifying a generated password by hand.
Never assume that silent truncation by a service preserves the displayed search space.
What This Tool Does Not Check
The generator does not send passwords to a breached-password service or compare them with a common-password list.
It does not test password-manager security, account recovery, multifactor settings, destination hashing, rate limiting, or phishing resistance.
It does not determine whether a generated value is acceptable under a particular organization's policy.
Its purpose is narrow: generate random strings accurately and explain their mathematical output space.
Privacy and Local Processing
Password generation and search-space calculations run entirely in the browser.
The implementation does not transmit generated passwords to Olivez or place them into a shareable URL.
Passwords are held in the page's temporary runtime state until settings change, Reset is selected, or the page is closed or replaced.
Selecting Copy deliberately sends the chosen text to the browser and operating-system clipboard.
Password Search-Space Formulas
The exact valid output count excludes strings that omit one or more selected character sets.
Formula variables
- Selected password length
- Total number of characters in the combined enabled pool
- Set of enabled character groups
- Number of available characters in enabled group i
- A subset of enabled groups excluded during one inclusion–exclusion term
- Number of strings containing at least one character from every enabled group
- Base-2 logarithm of the valid output count
- Largest accepted portion of the unsigned 32-bit range that divides evenly by the pool size
Examples
Password-manager default
1Input
20 characters; lowercase, uppercase, numbers, and symbols
Show result
Result
One uniformly generated password from an approximately 128.4-bit valid output space.
Every selected set appears at least once.
Exclude look-alike characters
2Input
20 characters; all four sets; ambiguous characters excluded
Show result
Result
A password using an 80-character combined pool with approximately 126.2 bits of valid search space.
I, l, 1, O, 0, and o are unavailable.
Letters and numbers only
3Input
16 characters; lowercase, uppercase, and numbers
Show result
Result
A password containing at least one lowercase letter, one uppercase letter, and one digit, with approximately 95.2 bits of valid search space.
Digit-only random code
4Input
20 characters; numbers only
Show result
Result
A uniformly generated 20-digit value with approximately 66.4 bits of search space.
This may be suitable as a stored random secret, but not as a short human-entered PIN.
Generate several independent passwords
5Input
Length 24; all sets; count 5
Show result
Result
Five independently generated passwords rather than variations of one base value.
Minimum length with four sets
6Input
Length 4; all four sets
Show result
Result
Each accepted password contains exactly one character from each selected set in a random order.
The configuration is valid but much shorter than the normal recommendation for an account password.
One selected character set
7Input
Length 20; lowercase only
Show result
Result
Every 20-character lowercase string is eligible, so the simple 26²⁰ output count applies.
Meet a site without symbol support
8Input
24 characters; lowercase, uppercase, and numbers
Show result
Result
A long random password that does not contain symbols.
Maximum supported length
9Input
256 characters; all four sets
Show result
Result
A 256-character random password, subject to the destination accepting that length.
Many ordinary sign-in forms support much shorter maximum lengths.
Frequently Asked Questions
Are generated passwords sent to a server?
No. Generation and search-space calculation occur locally in the browser.
What random source does the generator use?
It uses crypto.getRandomValues to obtain cryptographically strong browser random values.
Does it use Math.random?
No. It does not fall back to Math.random when Web Crypto is unavailable.
What is modulo bias?
Modulo bias occurs when a random-number range does not divide evenly by the character-pool size, causing some indexes to appear slightly more often. Rejection sampling removes that imbalance.
Does every selected character set appear?
Yes. Candidates missing any selected set are rejected and regenerated.
Are all valid passwords equally likely?
Yes. Complete candidates are sampled uniformly, and rejection depends only on whether every selected set appears.
Why not insert one character from each set and shuffle?
That guarantees category coverage but does not generally produce a uniform distribution across all valid final passwords.
What do the search-space bits mean?
They are the base-2 logarithm of the number of passwords the selected configuration can generate.
Are search-space bits the same as cracking time?
No. Cracking time depends on the attack method, password hashing, rate limits, breaches, hardware, password reuse, and other controls.
Why is the displayed value lower than length multiplied by log₂ of the pool?
The generator excludes strings that omit one or more selected character sets. Inclusion–exclusion counts only the valid outputs.
How long should a generated password be?
Use a long value supported by the destination and store it in a password manager. Twenty random characters is a practical default for many ordinary accounts, but requirements and threat models differ.
Should I enable every character set?
Not necessarily. Select sets accepted by the destination. Sufficient length and unique random generation matter more than satisfying a universal category checklist.
Why does NIST discourage composition rules?
Mandatory rules for user-chosen passwords often lead to predictable human patterns. This generator's controls instead configure a machine-random output and help meet destination compatibility requirements.
Which characters are considered ambiguous?
The filter removes I, l, 1, O, 0, and o.
Does excluding ambiguous characters make the password weak?
It slightly reduces the pool. Adding another random character generally more than compensates for that reduction.
Can I use spaces or Unicode characters?
No. This implementation uses a fixed ASCII character collection without spaces.
Can I choose my own symbols?
No. The symbol set is fixed in the current generator.
Why did a website reject the generated password?
The site may impose a shorter maximum or reject one of the symbols. Review its documented password policy and adjust only the incompatible option.
Can I generate several passwords at once?
Yes. Choose 1, 5, or 10. Every result is generated independently.
Should I reuse a generated password?
No. Assign a different generated password to every account.
Where should I store generated passwords?
Store them in a trusted password manager rather than an unprotected note, message, spreadsheet, or reusable personal pattern.
Does a random password protect against phishing?
No. A fraudulent site can capture a strong password. Use suitable multifactor authentication and verify where credentials are entered.
Does the tool check breached-password databases?
No. It makes no network request and does not perform a breach-corpus lookup.
Does the tool save password history?
No. It has no password-history feature or intentional persistent storage.
Is copying a password completely private?
Not necessarily. The operating system, browser, clipboard history, synchronized clipboard, extensions, or local software may retain copied content.
What happens when I change a setting?
The current generated batch is cleared so results are not mistaken for passwords made with the new settings.
Can a four-character password be generated?
Yes, but only when its length is at least the number of selected sets. Four characters is not a normal recommendation for an account password.
Can this generate encryption keys?
No. It generates password strings. Cryptographic keys should be created with the key-generation mechanism required by the relevant cryptographic system.
References
You might also like
Hash Generator & Checksum Checker
Generate SHA-256, SHA-384, or SHA-512 locally and compare files or text with a published checksum.
Random Number Generator
Generate random integers or fixed-decimal numbers from a custom range, with optional uniqueness and sorting.
Favicon & PWA Icon Generator
Generate favicon.ico, PNG favicons, Apple touch icons, regular and maskable PWA icons, a web manifest, HTML links, and deployment notes.
Morse Code Translator
Translate text to International Morse code or decode written dots and dashes, then copy or play the result without an account.