Password Generator

Generate cryptographically secure random passwords with customizable length and character sets. Instantly view strength ratings, entropy values, and estimated crack times for your generated password.

characters

Report a Bug

Why Password Security Matters

Every year, data breach reports reveal staggering numbers. Billions of credentials surface on underground forums, and a significant chunk of those passwords turn out to be embarrassingly simple. The string "123456" has topped leaked-password lists for over a decade running. "password" and "qwerty" routinely show up in the top ten. These are not isolated incidents from small, obscure websites. Major corporations, government agencies, and healthcare providers have all suffered breaches where weak employee or user passwords played a direct role.

The core problem is straightforward: human beings are terrible at generating randomness. We gravitate toward patterns, dictionary words, birthdays, pet names, and keyboard walks like "asdfgh." Attackers know this, and their cracking tools are built around these tendencies. A modern GPU cluster running hashcat can churn through billions of password hashes per second, systematically working through dictionaries, common substitutions (@ for a, 3 for e), and predictable patterns before resorting to pure brute force.

A properly random password sidesteps all of these weaknesses. When every character is selected independently from a large pool with no human bias, the attacker gains zero advantage from pattern-based strategies. The only option left is exhaustive search, and the mathematics of combinatorics make that search astronomically expensive for sufficiently long passwords. That is the entire point of a password generator: removing the human element from the selection process and replacing it with cryptographic randomness.

Understanding Entropy in Passwords

Entropy is a concept borrowed from information theory, originally formalized by Claude Shannon in 1948. When applied to passwords, it quantifies how difficult a password would be to guess if an attacker had to try every possible combination. Entropy is measured in bits, and each additional bit doubles the number of guesses required.

The calculation itself is not complicated. You take the size of the character set, raise it to the power of the password length, and then take the base-2 logarithm. If your password uses only lowercase letters (26 characters) and is 8 characters long, you get log₂(26⁸) = 37.6 bits of entropy. That sounds like a lot of combinations—roughly 200 billion—but a fast cracking rig can exhaust that space in under a minute.

Bump the character set to all 94 printable ASCII characters and extend the length to 16, and you land at about 105 bits. At 10 billion guesses per second, cracking that would take longer than the current age of the universe. The jump from 37 bits to 105 bits does not sound dramatic in plain numbers, but remember: each additional bit doubles the work. Going from 37 to 105 means the difficulty increases by a factor of 2⁶⁸, which is a number so large it has more than 20 digits.

Security researchers generally recommend a minimum of 60 bits of entropy for passwords protecting non-critical accounts, and 80 bits or more for sensitive systems like banking, email, or server access. Anything above 100 bits is considered exceptionally strong by current standards. This generator calculates entropy for every password it produces so you can see exactly where you stand.

Common Password Mistakes People Make

Reusing the same password across multiple sites is probably the single most dangerous habit. When one service gets breached—and eventually, some service you use will get breached—attackers immediately try those stolen credentials on banks, email providers, and social media platforms. This technique is called credential stuffing, and it works because so many people recycle passwords. A unique password per account limits the blast radius of any single breach.

Another widespread mistake is building passwords from personal information. Your dog's name, your anniversary date, your street address, the year you graduated—all of this information is either publicly available on social media or trivially easy to find through basic research. Targeted attacks on high-value individuals almost always start with open-source intelligence gathering, and personal details get tried first.

Minimal modifications to weak passwords create a false sense of security. Changing "password" to "P@ssw0rd!" feels clever, but cracking tools have incorporated leet-speak substitution rules for years. The word "password" with common substitutions is usually cracked within the first few thousand guesses, not billions. Similarly, appending a single digit or exclamation point to an otherwise weak password adds virtually nothing to its strength.

Short passwords are inherently vulnerable regardless of complexity. An 8-character password using the full ASCII set has about 52 bits of entropy. That puts it within reach of a determined attacker with decent hardware. Extending to 12 characters with the same character set pushes entropy to 78 bits, making the difference between hours and millennia of cracking time. Length is the single most effective lever you can pull to strengthen a password.

Passphrases: An Alternative Approach

A passphrase uses multiple random words strung together instead of a jumble of characters. The idea gained widespread attention through Diceware, a method published by Arnold Reinhold in 1995 that uses physical dice rolls to select words from a list of 7,776 entries. Each word adds about 12.9 bits of entropy, so a five-word Diceware passphrase yields roughly 64.6 bits, and a six-word phrase gives about 77.5 bits.

The advantage of passphrases is memorability. "correct horse battery staple" is far easier to remember than "x7#Qm!9pL2&v" even though the passphrase has slightly higher entropy. Your brain is wired to remember sequences of words much more effectively than strings of arbitrary characters. This means you are less likely to write the passphrase on a sticky note, store it in a plaintext file, or fall back to reusing it because you cannot recall it.

Passphrases do have a practical drawback: they are longer in terms of raw character count, and some older systems impose maximum password lengths that make them impractical. A 5-word passphrase typically runs 25 to 35 characters. Most modern systems accept passwords well beyond that length, but legacy banking portals, certain corporate VPNs, and some Wi-Fi routers may cut you off at 16 or 20 characters.

The strongest approach for most people is a combination strategy. Use a password manager to store unique, randomly generated passwords for each account, and protect the password manager itself with a strong passphrase you have memorized. That way you only need to remember one thing—the passphrase—while every individual account gets a distinct, high-entropy password generated by software. If any single account gets compromised, the damage stays contained.

Password Entropy Formula

Entropy = log₂(charset_size) × length

Password entropy measures the unpredictability of a password in bits. The charset_size is the total number of possible characters that could appear in each position. For a password that uses uppercase (26), lowercase (26), digits (10), and symbols (32), the charset size is 94. Entropy equals the base-2 logarithm of the charset size multiplied by the password length. A 16-character password drawn from all 94 printable ASCII characters has an entropy of log₂(94) × 16 ≈ 104.9 bits. Higher entropy means the password is harder to crack through brute-force or dictionary attacks.

Where:

  • charset_size = Total number of unique characters in the pool (e.g., 94 for full ASCII printable set)
  • length = Number of characters in the password
  • log₂ = Base-2 logarithm, converting the number of possible combinations into bits of entropy

Example Calculations

Strong 16-Character Password

Generating a password using all character types with a length of 16.

With all four character types enabled, the charset size is 94 (26 uppercase + 26 lowercase + 10 digits + 32 symbols). The entropy is log₂(94) × 16 = 6.555 × 16 = 104.9 bits. At 10 billion guesses per second, exhausting the full space of 94¹⁶ combinations would take approximately 6.4 × 10¹² years, far exceeding the age of the universe.

Alphanumeric Only, 12 Characters

A password without symbols, suitable for systems that restrict special characters.

Without symbols, the charset drops to 62 characters (26 + 26 + 10). Entropy is log₂(62) × 12 = 5.954 × 12 = 71.5 bits. This is still a strong password. Brute-forcing 62¹² possibilities at 10 billion per second takes roughly 9,400 years. For systems that do not allow special characters, this provides solid protection.

Frequently Asked Questions

This tool uses the Web Crypto API's crypto.getRandomValues() function, which is a cryptographically secure pseudo-random number generator built into modern browsers. Unlike Math.random(), which uses a predictable algorithm seeded by the system clock, crypto.getRandomValues() draws from the operating system's entropy pool. That pool collects randomness from hardware events such as mouse movements, disk I/O timing, and interrupt signals. The result is output that is computationally indistinguishable from true randomness, making it suitable for generating passwords and other security-sensitive material.

For most online accounts, 16 characters with a mix of all character types provides excellent security at over 100 bits of entropy. If you use a password manager and never need to type the password manually, there is no downside to going longer—20 or even 32 characters. For passwords you must occasionally type by hand, 12 characters with all character types (about 78 bits of entropy) is a reasonable minimum. Avoid going below 10 characters for any account you care about, and never go below 8 for anything.

Yes. Each password is generated entirely within your browser using client-side JavaScript. No password data is transmitted to any server, stored in any database, or logged anywhere. The generation happens in memory, and the password exists only on your screen until you copy it and navigate away. You should copy the password into a password manager right away, because once you leave or refresh the page, that particular password is gone and cannot be recovered.

Including symbols increases the charset from 62 to 94 characters, which adds about 0.6 bits of entropy per character compared to alphanumeric only. Over a 16-character password, that is roughly 10 extra bits, doubling the cracking difficulty about a thousand times over. However, some websites and legacy systems do not accept certain special characters, and symbols make passwords harder to type on mobile keyboards. If a system restricts symbols, compensate by adding 3 to 4 extra characters of length to maintain equivalent entropy.

The old advice of rotating passwords every 60 or 90 days has fallen out of favor. The National Institute of Standards and Technology (NIST) updated its guidelines in Special Publication 800-63B to recommend against mandatory periodic password changes unless there is evidence of compromise. Frequent forced changes lead people to pick weaker passwords or make trivial modifications. A better practice is to use a unique, strong password for each account and change it only if the service reports a breach or you suspect unauthorized access.

Related Calculators