# Password Generator

URL: https://hifreetools.com/security/password-generator

> Generate strong, random passwords with the character types and length you choose. They’re created with cryptographically secure randomness and never leave your browser.

## Quick answer

A strong password generator creates a random string from a chosen set of characters (lowercase, uppercase, digits, symbols). This tool uses the browser’s Web Crypto API for cryptographically secure randomness, so each password is unpredictable. A length of 16 or more with mixed character types is recommended.

## Formula

- each character = pool[uniform index], drawn with crypto.getRandomValues and rejection sampling
- entropy = length × log₂(pool size) bits

Random values come from the browser’s Web Crypto API (crypto.getRandomValues), which is cryptographically secure — unlike ordinary Math.random. Characters are drawn uniformly from the sets you enable, using rejection sampling so no character is slightly more likely than another. Passwords are generated on your device and are never transmitted or stored.

## Inputs

- Length (4–64) (4 to 64); default 16
- Lowercase a–z; default true
- Uppercase A–Z; default true
- Digits 0–9; default true
- Symbols !@#$%; default true
- No look-alikes (O 0 I l 1 S 5 B 8); default false

## Worked examples (computed by the page's own function)

- Length (4–64) = 16, Lowercase a–z = true, Uppercase A–Z = true, Digits 0–9 = true, Symbols !@#$% = true, No look-alikes (O 0 I l 1 S 5 B 8) = false → Your password = Oi^(MjFekz&&Hyud, Entropy = 102.8, Characters to choose from = 86  (16 × log₂(86) = 102.8 bits)
- Length (4–64) = 6, Lowercase a–z = false, Uppercase A–Z = false, Digits 0–9 = true, Symbols !@#$% = false, No look-alikes (O 0 I l 1 S 5 B 8) = false → Your password = 962194, Entropy = 19.9, Characters to choose from = 10  (6 × log₂(10) = 19.9 bits)
- Length (4–64) = 16, Lowercase a–z = true, Uppercase A–Z = true, Digits 0–9 = true, Symbols !@#$% = true, No look-alikes (O 0 I l 1 S 5 B 8) = true → Your password = onV&-X;LqCu9hg.c, Entropy = 100.3, Characters to choose from = 77  (16 × log₂(77) = 100.3 bits)

## Verification

Checked against 14 reference cases (expected values computed independently). Reviewed 2026-10-27. Latest change 2026-10-28: Moved to the schema generator renderer with a sourced ledger; same character sets, look-alike filter and unbiased draws, and the strength meter now shows the entropy in bits.

## FAQ

**Are these passwords secure?**
They’re generated locally with the Web Crypto API, a cryptographically secure source, and are not transmitted or stored by us. A password’s real-world security also depends on its length, where you store it, and your own device’s security — so use a long password and a reputable password manager.

**Is the password stored or sent anywhere?**
No. Generation happens entirely in your browser. We don’t transmit, log, or store any password you create.

**How long should my password be?**
For important accounts, 16 characters or more with a mix of types is a good baseline. Longer is stronger, especially when paired with a password manager.

**What makes a password strong?**
Unpredictability. A long random password from a large character set has high entropy, meaning there are too many possibilities to guess or brute-force.

**Why not just use Math.random?**
Math.random isn’t cryptographically secure and can be predictable. This tool uses crypto.getRandomValues, which is designed for security-sensitive randomness.

**Can I use this password generator on my phone?**
Yes. The tool runs on any browser (mobile or desktop) using the Web Crypto API. Generate, copy, and paste directly into your password manager or account form.


## Sources

- [NIST SP 800-63B — Digital Identity Guidelines (authentication)](https://pages.nist.gov/800-63-3/sp800-63b.html)
- [Wikipedia — Password strength (entropy of random passwords)](https://en.wikipedia.org/wiki/Password_strength)
- [MDN — Crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
- [Wikipedia — Rejection sampling](https://en.wikipedia.org/wiki/Rejection_sampling)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Password Generator", https://hifreetools.com/security/password-generator
