Creating Strong Passwords: A Complete Security Guide
How attackers crack passwords and how to stop them. Learn password strategies, use password managers effectively, and set up two-factor authentication.
Why Passwords Still Matter
Data breaches are a fact of digital life. In any given year, billions of credentials are exposed through compromised databases, phishing campaigns, and software vulnerabilities. Despite years of predictions that passwords would be replaced by biometrics, passkeys, or other authentication methods, the humble password remains the primary gatekeeper for the vast majority of online accounts. Knowing how attackers crack passwords, and how to create ones that resist those attacks, is a basic skill for anyone with an email address.
How Attackers Crack Passwords
Attackers have a whole toolkit of approaches, each exploiting a different weakness. Looking at them one by one shows why certain passwords fail and others hold.
Brute Force: The Exhaustive Search
A brute-force attack tries every possible combination of characters until it finds the correct one. At first glance, this sounds hopelessly slow, but modern hardware has made it frighteningly fast. A single consumer-grade GPU can test billions of password hashes per second against weak hashing algorithms like MD5 or SHA-1. A six-character password drawn from lowercase letters offers roughly 309 million possible combinations, which a modern GPU chews through in well under a second. Extend that password to twelve characters with a mix of uppercase, lowercase, digits, and symbols, and the number of combinations explodes into the sextillions, pushing the estimated crack time beyond thousands of years even at billions of guesses per second.
This exponential scaling is the mathematical foundation of password security, and it is why length matters more than any other single property. Each additional character multiplies the search space by the size of the character set. Going from 8 to 12 characters with a 72-character alphabet (letters, digits, and common symbols) multiplies the number of possibilities by roughly 27 million. Going from 12 to 16 characters multiplies it again by the same factor. The numbers rapidly become astronomical, which is precisely the point.
Dictionary Attacks: Exploiting Human Predictability
Brute force is the blunt instrument. Dictionary attacks are the scalpel. Instead of trying every possible combination, a dictionary attack starts from lists of known passwords, common words, names, dates, and popular phrases, then layers common transformations on top. Attackers know that people capitalize the first letter, append a number or exclamation point, and substitute special characters for letters in predictable ways. These "clever" modifications were reverse-engineered from leaked password databases years ago, and they are now baked into every cracking tool on the market. A password like "P@$$w0rd!" might feel strong to the person who created it, but it falls to a dictionary attack with common substitution rules in seconds.
The attack dictionaries themselves are vast. The RockYou breach alone exposed 32 million passwords, providing attackers with a rich corpus of real human password choices. Combined with linguistic databases, name lists, and the contents of every subsequent breach, a modern dictionary attack can test hundreds of millions of plausible passwords before the attacker ever resorts to brute force. The lesson is clear: any password based on a real word, name, or phrase, no matter how cleverly modified, is fundamentally weaker than a random string of the same length.
Rainbow Tables: Trading Time for Space
A rainbow table is a precomputed lookup structure that maps common passwords to their hash values. When an attacker obtains a database of password hashes, they don't need to crack each hash on the fly. They look it up in the table and read off the matching plaintext password almost instantly. A comprehensive rainbow table for short passwords can be gigabytes in size, but the lookup is practically instantaneous.
The defense against rainbow tables is salting: adding a unique random value to each password before hashing it, so that even identical passwords produce different hashes. Modern password hashing algorithms like bcrypt, scrypt, and Argon2 incorporate salting by design and are deliberately slow to compute, making both rainbow tables and brute force far less effective. But not every website uses modern hashing. Older databases protected by plain MD5 or SHA-1 remain vulnerable, which is why breaches of legacy systems continue to expose millions of credentials.
Credential Stuffing: The Cost of Reuse
Credential stuffing skips the cracking entirely and simply replays passwords that have already leaked. When a website is breached and its password database is leaked or decrypted, attackers take those username-and-password pairs and try them against hundreds of other services: email providers, banks, social media platforms, cloud storage, e-commerce sites. If you use the same password on multiple sites, a single breach compromises every account sharing that credential. The 2012 LinkedIn breach exposed 117 million credentials; attackers were still successfully using those passwords to infiltrate unrelated accounts years later, because millions of users had never changed them and had reused them across the web.
Phishing and Password Spraying
No password, however strong, can protect you if you hand it directly to an attacker. Phishing attacks use counterfeit login pages, urgent-sounding emails, and impersonation to trick users into entering their credentials on attacker-controlled sites. These attacks have grown far more sophisticated: modern phishing kits can clone a legitimate site's appearance pixel for pixel, complete with a valid HTTPS certificate for the lookalike domain, which makes visual detection nearly impossible.
Password spraying takes the opposite approach: instead of targeting one account with many passwords, it tries a small number of extremely common passwords against a large number of accounts. Passwords like "Password1" or "Summer2024!" are tried against thousands of accounts simultaneously, staying below lockout thresholds while exploiting the statistical certainty that some users will have chosen these predictable strings.
The Mathematics of Entropy
Security researchers quantify password strength using entropy, measured in bits. Entropy represents the number of binary decisions an attacker would need to make to guess the password, assuming they know the method used to generate it but not the specific output. A password with 40 bits of entropy has roughly one trillion possible values; one with 80 bits has about a trillion trillion, a number that dwarfs common estimates of the grains of sand on Earth.
A truly random 16-character password drawn from a 72-character alphabet carries roughly 99 bits of entropy, far beyond the reach of any current or foreseeable cracking technology. A four-word passphrase selected randomly from a 7,776-word list (the Diceware approach) carries about 51 bits. That holds up well against online guessing and against offline attacks on slow hashes like bcrypt, but a fast hash such as MD5 could fall to a determined attacker with serious hardware, so five or six words (about 65 or 77 bits) is the safer choice. The key point is that entropy comes from the randomness of the selection process, not from how complex the result looks. A password that looks complex but was chosen by a human, built from a name, a birthday, and a predictable letter substitution, may carry far less entropy than a plain-looking passphrase whose words were picked at random.
Building Passwords That Hold
Random Generation: The Gold Standard
The most secure approach is to let a machine generate truly random passwords: strings of characters with no patterns, no dictionary words, and no human biases. The obvious drawback is memorability. No one can reliably remember dozens of random 16-character strings, which is why random generation goes hand in hand with a password manager (more on this below). For every account except the one or two you must type from memory, random generation is the recommended approach. It produces maximum entropy, complete immunity to dictionary attacks, and no exploitable patterns whatsoever.
Passphrases: Strength Through Length
A passphrase strings together multiple randomly selected words to create a password that is both very long and relatively easy to remember. The concept was popularized by the famous XKCD comic "correct horse battery staple," and the underlying mathematics are sound: four words chosen at random from a large list make a passphrase that resists online guessing and slow-hash cracking, while six words put it beyond practical reach of current technology.
The big caveat is random selection. The words must be chosen by a random number generator, not by a person. Humans are terrible at being random; we gravitate toward related words, favorite phrases, song lyrics, and personal associations, all of which drastically reduce the effective search space. "I love my dog Max" feels like a passphrase but is trivially guessable. "Quantum fish umbrella mountain" behaves like one, because a machine chose the words and no human association connects them. Always use a dedicated passphrase generator (or real dice and a Diceware word list) rather than your own imagination.
The One Rule That Trumps Everything Else
Use a unique password for every account. A 128-bit-entropy password is worthless if it is shared across ten sites and one of them stores it in plaintext. The most valuable thing you can do for your security is make sure a breach on one platform never cascades into every other platform you use.
Password Managers: The Necessary Tool
Since truly random, unique passwords are impossible to memorize at scale, a password manager is a necessity for anyone with more than a handful of accounts. It stores all your credentials in an encrypted vault, protected by a single master password or passphrase that you do memorize. It generates random passwords for each new account, fills them in for you (so there's far less typing for a keylogger to capture), and many will alert you when a saved credential appears in a known data breach.
Modern password managers also offer a small but effective anti-phishing defense: they match stored credentials to specific domains and will refuse to auto-fill on a lookalike URL. If you navigate to a phishing site that mimics your bank's login page but uses a slightly different domain, your password manager will not offer the credentials, creating a moment of friction that can stop an attack before it succeeds.
Reputable options include 1Password (polished apps with family and team plans), Bitwarden (open source, with a free tier and a self-hosting option), and Apple's built-in Passwords app and iCloud Keychain (well integrated across Apple devices). KeePass remains a solid choice for people who prefer a fully offline, open-source tool. The specific tool matters far less than the habit: pick one, move your passwords into it, and stop reusing credentials.
Your master password deserves special attention. It should be a long passphrase of at least 16 characters, generated at random, and never used for any other account. Six random words such as "orbit-tundra-velvet-crayon-sputter-mango" give you around 77 bits of entropy, and you can make them memorable by picturing a scene that links them. This one password protects everything else, so it's worth taking the time to create it properly and commit it to memory.
Two-Factor Authentication: The Second Lock
Even a perfect password can be compromised through phishing, a server-side breach, or malware on your device. Two-factor authentication (2FA) adds a second verification step, so an attacker who obtains your password still cannot log in without access to the second factor.
TOTP: The Practical Middle Ground
The most widely supported form of 2FA is the TOTP (Time-Based One-Time Password) code generated by authenticator apps like Google Authenticator, Authy, or 1Password. During setup, the service and your app share a secret key. From that point forward, both sides use the key and the current time to independently generate a six-digit code that changes every 30 seconds. Because the code is computed locally on your device and is valid only briefly, a stolen code is useless within a minute or so, unlike a static password. A real-time phishing page can still relay a code as you type it, though, which is where hardware keys pull ahead. TOTP works offline, is free, and is supported by virtually every major online service.
SMS: Better Than Nothing, Worse Than Everything Else
SMS-based 2FA, where a code arrives as a text message, is better than having no second factor, but it carries real and well-documented vulnerabilities. SIM-swapping attacks, in which an attacker convinces a mobile carrier to transfer your phone number to a new SIM card, have been used to compromise high-profile accounts and steal cryptocurrency. SMS messages can also be intercepted through exploits in the SS7 signaling protocol that underpins the global phone network. If you have the option, always prefer an authenticator app over SMS.
Hardware Security Keys: The Strongest Option
The strongest form of consumer 2FA is a hardware security key compliant with the FIDO2/WebAuthn standard, such as a YubiKey or Google Titan key. These physical devices use public-key cryptography: during registration, the key generates a unique keypair and sends the public half to the server; during login, the server issues a cryptographic challenge that only the private key, which never leaves the device, can answer. Hardware keys resist phishing because the browser tells the key which domain is asking, and each credential is bound to the domain it was registered on. A fake login page on a lookalike domain gets nothing it can use. For your most important accounts (primary email, banking, and your password manager itself), a hardware security key provides the highest assurance currently available to consumers.
Security Questions: The Overlooked Weak Link
Security questions deserve a brief mention because they are frequently the weakest element of an otherwise solid security setup. Questions like "What is your mother's maiden name?" or "What city were you born in?" have answers that can often be found on social media, in public records, or through casual conversation. The pragmatic solution is to treat security questions as additional passwords: answer them with random strings or unrelated phrases (for instance, answering the "first pet" question with "Quantum-Elephant-9") and store the fabricated answers in your password manager alongside the account's credentials.
Putting It All Together
Good security comes from layers. The steps that matter most are straightforward: adopt a password manager, generate a unique random password for every account, enable 2FA everywhere it is offered (preferring authenticator apps or hardware keys over SMS), and check whether your email appears in known breaches at haveibeenpwned.com. These steps, taken together, place you well ahead of the vast majority of internet users and make you a far less attractive target for opportunistic attackers.
Loopaloo's Password Generator creates cryptographically random passwords at the length and character set you choose, shows exactly how much entropy the result carries, and estimates how long it would survive different kinds of attacker. The Password Strength Checker looks for the patterns that actually make a password guessable, such as dictionary words, dates, keyboard runs, and entries from common breach lists, so you can find and replace your weakest credentials first. Both tools run entirely in your browser, and nothing you type leaves your device.
Password security is not glamorous, and it demands a small investment of time and habit. But in a world where a single compromised credential can cascade into identity theft, financial loss, and months of painful remediation, that investment pays for itself many times over.
Related Tools
Password Generator
Make random passwords in one click, with the strength in bits calculated from the settings and the time each would take to guess.
Password Strength Checker
See how fast a password could really be guessed: common passwords, words, names, dates and keyboard runs found and costed, all in your browser.