Technical utilities · Calculation notebook

Password Generator: Secure Local Randomness: Worked Examples

Explain cryptographic randomness, character pools and shuffling. Compare length scenarios and look-alike exclusions without promising password safety.

Why the calculation is structured this way

For independent uniform choices, an alphabet of A and length L gives A^L strings. Required category coverage changes the valid set, so this simple formula is a comparison model rather than an exact entropy audit. Secure selection must also avoid modulo bias; appearance alone does not demonstrate unpredictability.

A second scenario you can verify

Sixteen lowercase characters have model size 26^16 and about 75.2 log₂ bits; twelve alphanumeric characters have 62^12 and about 71.5. This does not claim a specific crack time. With four required categories, length below four cannot contain at least one member of each, so that configuration is rejected.

What changes the interpretation

Password reuse, phishing, clipboard exposure and insecure storage are outside the alphabet count. Use a password manager and additional authentication where appropriate. Removing ambiguous characters reduces alphabet size; it is a readability option, not a strength boost by itself.

Check the selection policy without exposing the generated secret

A reproducible generator test should assert length, permitted alphabet and required category presence, not compare a generated password with a fixed string. A fixed “expected password” would defeat the purpose of unpredictable generation. Statistical appearance tests also do not replace a review of the cryptographic random source and selection procedure.

In a small illustrative alphabet of a and 0, length-two unconstrained strings are aa, a0, 0a and 00. Requiring both categories leaves only a0 and 0a. This shows why alphabet-size-to-the-length is not the exact valid-set size once category coverage is required. For real settings, the alphabet and filtering choices need explicit counts before making any exact entropy claim.

Removing visually ambiguous characters helps manual entry but lowers the alphabet size. A longer supported length may compensate in a simple comparison model, while a password manager can reduce the transcription need altogether. Reuse and capture remain separate risks. Never add generated values, partial secrets or entered credentials to analytics, test fixtures or public screenshots.

Input reference and units

These values reproduce the model’s demonstration. Replace them with your own records or measurements; they are not recommended targets.

On a small screen, swipe horizontally to see all columns. With a keyboard, focus the table and use the arrow keys.

Parameters used by this calculator
ParameterDemonstration valueHow to enter it
Length16 Enter length without adding a unit suffix. Scope: Length must be at least the number of selected character types, and at most 128.
Uppercase letterstrue Each generated password includes at least one character of this selected type.
Lowercase letterstrue Each generated password includes at least one character of this selected type.
Digitstrue Each generated password includes at least one character of this selected type.
Symbolstrue Each generated password includes at least one character of this selected type.
Exclude look-alike characters (I, l, 1, O, 0, o)false Remove I, l, 1, O, 0 and o from their character pools; every selected type remains present.

Password Generator: calculation relationships

Generate a password locally using the browser’s cryptographic random source. Include each selected character type at least once, then securely shuffle the generated characters. Length must be at least the number of selected character types, and at most 128. Use HTTPS or localhost. Store passwords in a password manager; no strength or breach-resistance guarantee is made. The optional look-alike exclusion removes I, l, 1, O, 0 and o; selected character types still appear at least once.

For a length L and an unconstrained alphabet of N characters, there are Nᴸ strings. Requiring each chosen character type changes that model, so the tool does not claim a simple entropy score. It uses cryptographic randomness and rejection sampling for character selection. Generate a 24-character example and check length and selected types; its literal characters are deliberately not published as a reusable password. Optional look-alike exclusion removes I, l, 1, O, 0 and o before selecting characters. It improves transcription clarity, not a promised strength rating; CSPRNG selection and each-type inclusion remain unchanged.

random index = uniform integer in [0, pool length − 1]
  • length: Length. Enter length without adding a unit suffix. Scope: Length must be at least the number of selected character types, and at most 128.
  • upper: Uppercase letters. Each generated password includes at least one character of this selected type.
  • lower: Lowercase letters. Each generated password includes at least one character of this selected type.
  • digits: Digits. Each generated password includes at least one character of this selected type.
  • symbols: Symbols. Each generated password includes at least one character of this selected type.
  • excludeAmbiguous: Exclude look-alike characters (I, l, 1, O, 0, o). Remove I, l, 1, O, 0 and o from their character pools; every selected type remains present.
  • Result units: stated beside each output
  • Calculation relationship: random index = uniform integer in [0, pool length − 1]
  • Supported domain: see the limits below

Worked example

Password Generator baseline input: Length: 16; Uppercase letters: selected; Lowercase letters: selected; Digits: selected; Symbols: selected; Exclude look-alike characters (I, l, 1, O, 0, o): not selected. Output: Generated length = 16 characters. This demonstrates length and character-type constraints, not a fixed password. Every generation changes the characters; check the length and selected character types instead.

Reproduce the default scenario

This reproduces the default inputs in the reference table above; it is not an additional independent example. Displayed rounding may differ from intermediate precision.

Generated length
16 characters

Common questions and boundary checks

Does generation send my password to the server?

Generation is local; the value should not be included in analytics or support examples.

Does ambiguous-character exclusion add entropy?

No. It improves readability while reducing the alphabet.

Why must length cover all selected categories?

At least one position is needed for each required category.

Can the tool promise a crack time?

No precise time follows without attack, hashing and compromise assumptions.

Should a generated password be reused?

Use a distinct value for each service and store it securely.

Sources and content notes

Toolify describes the implemented algorithm and its assumptions. Sources below support the topic or applicable rules; they do not endorse this calculator. Examples are illustrative, and published rules take precedence over simplified estimates.

Report a formula, example or translation issue through our contact page. Include the tool name, inputs and expected result so it can be reproduced. Contact Toolify

From question to result

Continue with a related question

Explore all Technical utilities tools and guides