Password Generator

Generate strong passwords with custom length and character sets, including uppercase, lowercase, numbers, and symbols.

Planning notes, formulas, and examples

About the Password Generator

The Password Generator creates strong, random passwords with customizable length and character sets. Choose from uppercase letters, lowercase letters, numbers, and special symbols to create passwords that meet any security requirement.

Weak passwords are the leading cause of security breaches. A strong password should be at least 12 characters long, include multiple character types, and be unique for every account.

This generator uses JavaScript's Math.random() to assemble passwords from your selected character set. Each character is chosen independently, maximizing entropy. The tool also estimates password entropy in bits to help you gauge strength.

When This Page Helps

Humans create predictable passwords. This generator produces truly random passwords with high entropy, making them resistant to brute-force and dictionary attacks.

How to Use the Inputs

  1. Set the desired password length (8โ€“128 characters).
  2. Toggle character types: uppercase, lowercase, numbers, symbols.
  3. Click Generate.
  4. View the password and its entropy (bits).
  5. Copy and store in a password manager.
Formula used
Entropy = length ร— logโ‚‚(pool_size) Pool size examples: - Lowercase only: 26 - + Uppercase: 52 - + Numbers: 62 - + Symbols: ~94

Example Calculation

Result: e.g. k7#Tz!mQ9&xR4wLp

A 16-character password using all character types (94 pool) has about 105 bits of entropy. Brute-forcing this would take billions of years.

Tips & Best Practices

  • Use at least 12 characters for reasonable security.
  • Include all character types for maximum entropy per character.
  • Never reuse passwords across different accounts.
  • Use a password manager to store complex passwords.
  • 16+ characters makes brute-force attacks infeasible.
  • Passphrases (random words) can be both strong and memorable.

Password Entropy

Entropy in bits = password length ร— logโ‚‚(character pool size). A 94-character pool (all printable ASCII) gives ~6.55 bits per character. 80+ bits of entropy is considered strong.

Common Password Attacks

Dictionary attacks try common words and patterns. Brute-force attacks try every combination. Rainbow tables precompute hashes. Random passwords defend against all three methods.

Passphrases

An alternative to random characters is a passphrase: 4โ€“6 random words (e.g., "correct horse battery staple"). Passphrases can be strong and memorable, with entropy depending on the word list size.

Consistent practice with varied problems builds computational fluency and deepens conceptual understanding that transfers across many technical fields.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • At least 12 characters for general use, 16+ for high-security accounts. Each additional character exponentially increases cracking difficulty.