Password Generator preview

Password Generator

Generate cryptographically secure random passwords with customizable length (6-64 characters) and character types. Uses your browser's built-in crypto API. Passwords are never saved or sent to any server.

Key features

  • Passwords with letters, numbers, and special symbols
  • Adjustable length from 6 to 64 characters
  • Strength label for each password based on length and character types
  • Generated on your device and never stored

Guide

Passwords are the first line of defense for every online account, server, database, API key, and encrypted file. A weak password can be cracked in seconds by modern hardware. A strong password generated with sufficient randomness is practically unguessable even with the most powerful computing resources available. This tool generates 1 to 20 cryptographically random passwords at a time, from 6 to 64 characters long, using any mix of four character sets.

What Makes a Password Strong

Password strength comes from two factors: length and randomness (entropy). Entropy is measured in bits. Each bit of entropy doubles the number of possible passwords an attacker must try. A password with 80 bits of entropy has 2^80 possible values, which is about 1.2 x 10^24 combinations.

For a password using the full printable ASCII set (uppercase, lowercase, digits, and 32 special characters = 95 characters total), each character adds about 6.57 bits of entropy (log2(95)). A 12-character password has about 79 bits, a 16-character password has about 105 bits, and a 20-character password has about 131 bits.

For comparison, a password using only lowercase letters (26 characters) gets 4.7 bits per character. A 12-character lowercase-only password has only 56 bits of entropy. That is why mixing character types matters: it increases the character set size, which increases per-character entropy.

Current recommendations from NIST (SP 800-63B), OWASP, and security researchers: use at least 12 characters for standard accounts and 16+ characters for high-value targets (admin accounts, master passwords, encryption keys). Length is more important than complexity. A 20-character lowercase password (94 bits) is stronger than an 8-character password with all character types (52 bits).

The key insight: password strength depends entirely on how the password was generated, not on how complex it looks. The password P@ssw0rd! looks complex to a human but is trivially crackable because it follows a predictable pattern (common word + common substitutions + trailing symbol). A truly random 12-character string like xk7Qm2nR4pLs has no pattern for an attacker to exploit.

How Cryptographic Randomness Works

This tool uses the Web Crypto API (crypto.getRandomValues()) to generate random numbers. This is a cryptographically secure pseudorandom number generator (CSPRNG) provided by your operating system. It draws entropy from hardware sources like mouse movements, keyboard timings, disk access patterns, network packet arrival times, and dedicated hardware random number generators (Intel RDRAND, ARM TRNG).

CSPRNG output is fundamentally different from Math.random(). Math.random() uses algorithms like xorshift128+ that produce statistically random-looking output but are fully deterministic and predictable if you know the internal state. An attacker who observes a few outputs of Math.random() can predict all future outputs and recover past outputs. This has been demonstrated in practice. crypto.getRandomValues() does not have this weakness because it continuously mixes in new hardware entropy.

Never use Math.random() for generating passwords, tokens, session IDs, nonces, encryption keys, or any security-sensitive values. Always use crypto.getRandomValues() in the browser, crypto.randomBytes() in Node.js, secrets.token_bytes() in Python, SecureRandom in Java, or /dev/urandom on Unix systems.

The tool fills an array of 32-bit random numbers and maps each one to a character with the modulo operation. With a pool of at most 88 characters and about 4.29 billion possible values, the bias this creates is about one part in 48 million, which has no practical effect on strength.

Password Generation Options

Length: The single most important parameter. Every additional character multiplies the time an attacker needs by the size of the character set. Adding one character to a password with a 95-character set multiplies the attack time by 95. Set the minimum to 12 for general use, 16 for important accounts, and 20-32 for encryption keys and master passwords.

Uppercase letters (A-Z): 26 characters. Almost always included. Required by most password policies.

Lowercase letters (a-z): 26 characters. Almost always included. The backbone of most passwords.

Digits (0-9): 10 characters. Include these to satisfy most password policies. Some systems require at least one digit.

Special characters: the !@# button adds 26 symbols, such as ! @ # $ % & * and brackets. They add entropy per character because they expand the character set. The set leaves out spaces, quotes, backslashes and backticks, which many services reject. If a service still rejects a password, turn off the !@# button and add a few characters of length.

Ambiguous characters: the tool does not filter characters that look alike in many fonts, such as 0 and O or 1, l and I. If you need to read a password aloud or write it on paper, generate several and pick one that avoids them.

Character set limits: you can only switch the four sets on or off. If a service allows letters and digits only, turn off the !@# button and increase the length to make up for the smaller pool of 62 characters.

Types of Passwords

Random character passwords like x7#Kp9$mQ2&nL4 are the strongest per character but impossible to memorize. Use these with a password manager. They are ideal for any account where you will not need to type the password from memory.

Passphrases like correct-horse-battery-staple use random words instead of random characters. A 4-word passphrase from a 7,776-word list (like the EFF Diceware wordlist) has about 51 bits of entropy. A 6-word passphrase has about 78 bits. A 7-word passphrase has 90 bits. Passphrases are easier to type on mobile devices and easier to memorize, but are longer in character count. Use passphrases for your master password and for passwords you must type from memory.

PIN codes are numeric passwords used for phone locks, banking, ATMs, and 2FA backup codes. A 4-digit PIN has only 13.3 bits of entropy (10,000 combinations). A 6-digit PIN has 19.9 bits (1,000,000 combinations). Use at least 6 digits for PINs, and 8+ digits for anything serious. PINs are inherently weak and should only be used with lockout mechanisms that limit attempts.

This tool focuses on random character passwords. For passphrases, use a dedicated generator like the EFF Diceware page or Bitwarden's passphrase option.

Password Entropy Calculations

Here are exact entropy values for common configurations:

  • 8 chars, lowercase only: 37.6 bits (crackable in minutes on a modern GPU)
  • 8 chars, mixed case + digits: 47.6 bits (crackable in hours)
  • 8 chars, mixed case + digits + symbols: 52.6 bits (crackable in hours to days)
  • 10 chars, mixed case + digits + symbols: 65.7 bits (crackable in weeks)
  • 12 chars, lowercase only: 56.4 bits (borderline)
  • 12 chars, mixed case + digits: 71.5 bits (solid for most uses)
  • 12 chars, mixed case + digits + symbols: 78.8 bits (strong)
  • 14 chars, mixed case + digits + symbols: 92 bits (very strong)
  • 16 chars, mixed case + digits + symbols: 105 bits (very strong)
  • 20 chars, mixed case + digits + symbols: 131 bits (extremely strong)
  • 24 chars, mixed case + digits + symbols: 157 bits (overkill for most purposes)

For context, the Bitcoin mining network operates at about 5 x 10^20 hashes per second. At that rate, brute-forcing an 80-bit entropy password would take about 38 years. 100 bits would take 38 million years. At 128 bits, the sun will burn out before the password is cracked. These numbers assume the attacker is hashing passwords as fast as the entire Bitcoin network mines blocks, which is unrealistically generous to the attacker.

Password cracking in practice uses GPUs running hashcat or John the Ripper. A single RTX 4090 GPU can compute about 164 billion MD5 hashes per second, 68 billion SHA-1 hashes per second, or 22 billion SHA-256 hashes per second. Against bcrypt (cost 12), the same GPU manages only about 105,000 hashes per second. This is why proper password hashing functions (bcrypt, scrypt, Argon2) are so important on the server side.

When to Use This Tool

New account registration: Generate a unique password for every new account. Never reuse passwords across services. If one service is breached, reused passwords let attackers access all your other accounts. This attack, called credential stuffing, is responsible for the majority of account takeovers.

API keys and tokens: When a service asks you to create a secret key or API token, use the generator instead of typing something from memory. A 32-character random alphanumeric string provides about 190 bits of entropy.

Database credentials: Set strong passwords for database users, especially the admin/root account. Database breaches through weak credentials are common. Set a 24+ character random password for production databases.

Encryption passphrases: For encrypting files with GPG, VeraCrypt, 7-Zip, or OpenSSL, use a long random password. Store it in your password manager. The encryption is only as strong as the passphrase.

WiFi passwords: Your WPA2/WPA3 password should be at least 16 random characters. A weak WiFi password allows anyone within signal range to capture and brute-force the handshake offline.

SSH key passphrases: Protect your SSH private key with a strong passphrase generated here. If your private key is stolen (from a backup, a compromised laptop, or a cloud storage breach), the passphrase is the only thing preventing the attacker from using it.

Service accounts: Automated systems (CI/CD pipelines, monitoring, backup scripts) that authenticate with passwords should use long random passwords. These passwords are never typed by humans, so length and complexity cost nothing.

Common Mistakes

Mistake 1: Using predictable patterns. Passwords like Summer2026!, Company@123, qwerty!@#, or Welcome1 follow patterns that attackers check first. Password cracking tools use rule-based attacks that try common patterns: word + year + symbol, word + number + number, word with common substitutions (a to @, e to 3, s to $). These rules crack most human-chosen passwords in minutes.

Mistake 2: Making passwords too short to satisfy complexity requirements. If a site requires a special character and you change "password" to "password!", you have not improved security meaningfully. The password is still based on a dictionary word. Generate a fresh random password of proper length.

Mistake 3: Storing passwords in plain text files, spreadsheets, sticky notes, email drafts, or browser autofill without a master password. Use a dedicated password manager (Bitwarden, 1Password, KeePass, Proton Pass) with a strong master password. The master password is the one password you memorize.

Mistake 4: Not using a password manager. Human memory cannot reliably store unique 16-character random passwords for dozens or hundreds of accounts. Accept this limitation and use a manager. The time investment to set up a password manager pays for itself the first time you avoid a compromised account.

Mistake 5: Sharing passwords via email, Slack, Discord, SMS, or any channel that stores message history. These channels are not encrypted end-to-end or store messages in logs accessible to administrators and attackers. Use a secure sharing feature in your password manager (Bitwarden Send, 1Password secure sharing) or a self-destructing link service like onetimesecret.com.

Mistake 6: Reusing passwords across personal and work accounts. A breach on a personal service can lead to a compromise of your work accounts. Keep all passwords unique.

Advanced Tips

Generate passwords in bulk when setting up new infrastructure. If you are provisioning 10 database users, 5 API integrations, and 3 service accounts, generate all passwords at once and store them in your password manager before you start configuring. This prevents the temptation to use quick, memorable passwords during setup.

For systems that require periodic password rotation (a declining practice per NIST recommendations, but still required in some compliance frameworks like PCI-DSS), bookmark this tool and generate fresh passwords on the rotation schedule. Do not increment a counter, change a single character, or follow any pattern. Each rotation should produce a completely new random password.

When a service rejects your generated password, it is usually because of a restricted special character. Common culprits are " (double quote), ' (single quote), \ (backslash), ` (backtick), and sometimes < > which can cause issues in HTML forms or XML contexts. Spaces are occasionally forbidden too. The !@# set in this tool already leaves out quotes, backslashes, backticks and spaces. If a service rejects one of its other symbols, turn off the !@# button and use letters and digits with extra length.

For systems where you must type the password (server console login, BIOS password, safe combination), use a passphrase instead of random characters. A 5-word Diceware passphrase is much easier to type accurately than a 16-character random string, especially under pressure.

Consider using different password lengths for different threat levels. Low-value accounts (newsletter subscriptions, free trials): 14 characters. Medium-value accounts (social media, shopping): 16 characters. High-value accounts (email, banking, password manager): 20+ characters. Encryption keys: 32+ characters.

Password Policies and Compliance

Many organizations and regulations require specific password policies. Understanding these requirements helps you generate passwords that comply without being told which rule to follow.

NIST SP 800-63B (2024 revision) recommends: minimum 8 characters (15+ for high-value accounts), no complexity requirements (they found that forcing special characters leads to predictable patterns), no periodic rotation (unless there is evidence of compromise), screening against breached password lists, and allowing all printable ASCII characters plus Unicode.

PCI-DSS 4.0 requires: minimum 12 characters (increased from 7 in earlier versions), mix of alpha and numeric characters, passwords changed every 90 days for administrative access, and different credentials for each user.

HIPAA does not specify exact password requirements but requires that covered entities implement reasonable safeguards. Most auditors expect at least 12 characters with complexity requirements.

SOC 2 controls typically require minimum 12 characters, complexity requirements, rotation every 90 days for privileged accounts, and multi-factor authentication alongside passwords.

The trend across all frameworks is toward longer passwords and away from arbitrary complexity rules. Length provides more measurable security than requiring exactly one uppercase, one lowercase, one digit, and one special character.

Multi-Factor Authentication and Passwords

Strong passwords are necessary but not sufficient. Multi-factor authentication (MFA) adds a second verification step: something you know (password) plus something you have (phone, hardware key) or something you are (biometric). Even if an attacker cracks or steals your password, they cannot access the account without the second factor.

However, MFA does not eliminate the need for strong passwords. Some MFA methods (SMS codes) are vulnerable to SIM swapping. Phishing attacks can capture both password and TOTP code in real-time. A strong password remains the baseline, and MFA adds defense in depth.

Use this tool to generate strong passwords even for MFA-protected accounts. Hardware security keys (YubiKey, Google Titan) provide the strongest second factor. TOTP apps (Google Authenticator, Authy) are next. SMS-based MFA is the weakest but still better than password alone.

Checking Passwords Against Breach Databases

After generating a password, you might want to verify it has not appeared in known data breaches. The Have I Been Pwned (HIBP) service provides a safe way to check this. Their Pwned Passwords API uses k-anonymity: you send only the first 5 characters of the SHA-1 hash of the password, and the API returns all known hash suffixes matching that prefix. Your full password hash never leaves your device.

A random 16-character password from this tool is very unlikely to appear in a breach database, because the chance that a random string matches a previously used password is close to zero. This check is more useful for human-chosen passwords or passphrases.

Password Storage for Developers

If you are building an application that stores passwords, use this guide to understand the password generation side, but follow these server-side rules:

Never store passwords in plain text. This includes database fields, log files, error messages, and debug output.

Never use MD5, SHA-1, or SHA-256 directly for password hashing. These are too fast. Use bcrypt with cost factor 12+, scrypt with N=2^15 and r=8, or Argon2id with t=3 and m=65536.

Always use a unique random salt per password. Modern password hashing functions (bcrypt, Argon2) generate and embed the salt automatically. Never use a global salt shared across all passwords.

Never implement password hashing yourself. Use a well-tested library: bcrypt (available in every language), Argon2 (via libsodium or argon2-cffi in Python), or scrypt (built into Node.js crypto module).

Never truncate passwords before hashing. If a user provides a 100-character password, hash all 100 characters. Some systems silently truncate at 72 bytes (bcrypt's limit). If using bcrypt, pre-hash with SHA-256 to handle longer passwords.

Never email passwords to users. Use a password reset flow with a time-limited, single-use token instead.

Frequently asked questions

How secure is my password?

Passwords use cryptographically secure randomness from your browser's crypto API. They cannot be predicted or guessed.

Are passwords saved somewhere?

No. When you refresh the page, the password is gone. No server, no logs, no history.

Is this a free alternative to password manager generators?

Yes. Generate cryptographically random passwords here for free with no extension or account required.

Related guides

Related WebRecast sections