Technology ¡ 2026-06-18

How to Generate a Strong Password: A Complete Guide to Password Security

What makes a password uncrackable? Learn the math of password strength, common mistakes, and how to use a random generator the right way.

The Single Most Important Security Habit

If you do only one thing to protect yourself online, make it this: use strong, unique passwords for every account, generated by a trustworthy random generator. Not a clever variation of your dog's name. Not the same password with a number added for "security." A genuinely random string that no human and no computer can guess.

This is boring advice. It's also the advice that would prevent the vast majority of account takeovers, identity theft, and data breaches that plague modern life. This guide explains why strong passwords matter, what "strong" actually means, the math behind password cracking, and how to use a random generator correctly.

How Passwords Get Cracked

To understand why randomness matters, you need to understand how attackers actually break passwords. There are three main methods, in roughly increasing order of sophistication:

1. Guessing (the human attack)

The simplest attack is just trying common passwords. Attackers have lists—often leaked from previous breaches—of the most popular passwords: "password," "123456," "qwerty," "letmein," your name, your birthday, your pet's name. An astonishing percentage of real-world accounts use passwords from these lists. An attacker with a list of the top 10,000 passwords can crack a huge fraction of accounts in seconds.

This is why password reuse is so dangerous. If you use the same password across ten sites and one of them gets breached, attackers now have the password for the other nine. They don't need to crack anything—they just try the leaked password and walk in.

2. Dictionary attacks (the linguistic attack)

Beyond the most common passwords, attackers use dictionaries—not just English words, but dictionaries of common substitutions ("p@ssword," "passw0rd"), common phrases, song lyrics, sports teams, and pop culture references. Any password made of real words, even with numbers and symbols added, is vulnerable to a dictionary attack, because attackers have thought of all the obvious variations.

This is why "correct horse battery staple" (the famous XKCD example) is strong in theory but weak if attackers specifically target multi-word phrases—which they now do. The strength of a passphrase depends on the words being truly random, not a phrase that makes sense.

3. Brute force (the mathematical attack)

If guessing and dictionaries fail, attackers fall back to trying every possible combination: a, b, c, ... aa, ab, ac, ... This is computationally expensive but feasible for short passwords. The time required depends entirely on password length and character set size.

This is where the math comes in, and where randomness becomes essential.

The Math of Password Strength

A password's strength is measured in entropy, usually expressed in bits. Each bit of entropy doubles the number of possible passwords, which doubles the time an attacker needs to brute-force it.

The formula is simple: entropy = log₂(charset_size^length). Let's break this down with concrete examples:

  • 4-digit PIN: Charset is 10 digits (0–9), length is 4. Entropy = log₂(10⁴) ≈ 13 bits. That's only 10,000 possibilities—trivially crackable.
  • 8-character lowercase password: Charset is 26 letters, length is 8. Entropy = log₂(26⁸) ≈ 38 bits. About 200 billion possibilities. Crackable in hours on modern hardware.
  • 8-character password with mixed case, numbers, symbols: Charset is ~95, length is 8. Entropy = log₂(95⁸) ≈ 52 bits. About 6 quadrillion possibilities. Crackable in days to weeks on serious hardware.
  • 12-character random password (full charset): Entropy ≈ 78 bits. About 60 octillion possibilities. Not crackable by any current hardware in a human lifetime.
  • 16-character random password: Entropy ≈ 104 bits. Effectively uncrackable by any conceivable classical computer.

Two principles emerge:

  1. Length matters more than complexity. Going from 8 to 12 characters adds far more entropy than adding symbols to an 8-character password. A 16-character lowercase password is stronger than an 8-character password full of symbols.
  2. Randomness is non-negotiable. The math assumes the password is actually random. A 16-character password that spells a phrase has far less entropy than the math suggests, because attackers target phrases.

The takeaway: aim for at least 12–16 random characters, using the full character set (upper, lower, numbers, symbols). This gives you 78–104 bits of entropy, which is strong against any plausible attack.

Why Randomness Beats Human-Chosen Passwords

Here's the hard truth: humans are terrible at generating randomness. When asked to create a "random" password, people consistently produce patterns: capitalized first letter, lowercase rest, a number at the end, maybe a symbol. Attackers know these patterns and exploit them ruthlessly.

A human-chosen 12-character password like "Sunshine2019!" looks strong but has maybe 30 bits of real entropy, because it follows a predictable structure. A randomly generated 12-character password like "k7$mQ!9pL2#x" has the full 78 bits. Same length, wildly different strength.

This is why a trustworthy random generator is essential. Only a computer (specifically, a cryptographically secure one) can produce passwords that achieve the entropy the math promises. Our password generator uses the Web Crypto API—the same randomness source used for encryption keys—so every character is genuinely unpredictable.

Common Password Mistakes to Avoid

A few patterns that undermine even "strong" passwords:

  1. Reusing passwords across sites. The #1 mistake. If one site is breached, all your accounts with that password are compromised. Use a unique password everywhere.
  2. Using personal information. Names, birthdays, addresses, pet names, and team affiliations are all easily findable on social media. Attackers scrape this data.
  3. Predictable substitutions. "P@ssw0rd!" isn't strong just because it has symbols. Attackers have dictionaries of every common substitution.
  4. Keyboard patterns. "qwerty," "asdfgh," "1qaz2wsx"—these are in every cracking dictionary.
  5. Reusing with small variations. "Password1," "Password2," "Password3" for different sites are all effectively the same password once an attacker spots the pattern.
  6. Trusting the "password strength meter." Many meters only check length and character variety, not actual entropy. A meter can say "strong" for a password that's trivially crackable.
  7. Storing passwords in plain text. A notes file, an email to yourself, a sticky note—any of these defeat the purpose. Use a password manager.

How to Use a Password Manager (and Why You Should)

The honest reality: you cannot memorize 100+ strong, unique passwords. Nobody can. The solution is a password manager—software that generates, stores, and autofills your passwords, locked by a single master password that you do memorize.

Popular options include Bitwarden, 1Password, Dashlane, and KeePass (for the technically inclined). All of them can generate strong random passwords on demand and sync them across your devices.

The workflow:

  1. Install a password manager and create a strong master password (use our generator!). This is the one password you must memorize.
  2. Enable two-factor authentication on the password manager itself, for an extra layer of protection.
  3. Generate a new random password for every account, using the maximum length the site allows (often 32+ characters).
  4. Let the manager autofill. You never type the password; the manager handles it.
  5. Audit periodically. Most managers flag reused, weak, or breached passwords. Fix them.

The upfront effort is real—you'll spend an afternoon updating your accounts. But once it's done, your security posture improves dramatically, and day-to-day life gets easier (no more password resets).

The Role of the Random Generator

A password manager's built-in generator is convenient, but you may also want a standalone generator for cases where the manager isn't available, or where you want full control over the parameters. Our password generator lets you:

  • Set the length (we recommend 16+ characters).
  • Choose the character set (uppercase, lowercase, numbers, symbols).
  • Exclude ambiguous characters (like O/0, l/1) if readability matters.
  • Generate passwords entirely client-side, so the password never leaves your device.

The generator uses the Web Crypto API's CSPRNG, which is the same entropy source browsers use for encryption keys. This matters: a generator using a weaker PRNG (like Math.random()) could produce passwords that are predictable in ways you can't detect. Cryptographic randomness is non-negotiable for password generation.

Two-Factor Authentication: The Essential Companion

Even the strongest password can be phished, leaked, or stolen from a breached site. Two-factor authentication (2FA) adds a second layer: something you know (the password) plus something you have (a phone, a hardware key, an authenticator app).

Enable 2FA on every account that offers it, especially email, banking, and password managers. Use an authenticator app (like Authy or Google Authenticator) or, ideally, a hardware key (like a YubiKey) rather than SMS-based 2FA, which is vulnerable to SIM-swapping attacks.

2FA doesn't replace strong passwords—it complements them. Together, they make your accounts dramatically harder to compromise, even if an attacker obtains your password.

A Practical Action Plan

If you've read this far, here's what to do today:

  1. Check if your email appears in known breaches at haveibeenpwned.com. If it does, those passwords are compromised and must be changed.
  2. Pick a password manager and install it. Bitwarden is free and well-regarded.
  3. Generate a strong master password using our generator. Memorize it.
  4. Start with your most important accounts (email, banking, password manager itself) and update them to strong, unique passwords.
  5. Enable 2FA on those accounts.
  6. Work through the rest over the next week. Prioritize accounts with financial or personal data.
  7. Never reuse a password again. Every new account gets a fresh, random password from the manager.

This is the single highest-impact security upgrade you can make. It takes an afternoon. It protects you for years. And once it's done, you'll wonder why you ever memorized passwords at all.


Ready to secure your accounts? Generate a strong password now.