What Makes a Password Strong: Length, Randomness and Entropy
6 min read · Published 1 November 2026 · Updated 2 November 2026
Most password advice is a list of rules: add a capital letter, a number and a symbol. The rules often produce passwords that are hard to remember but still easy to guess, like "P@ssw0rd1!". Strength really comes from two things: how long the password is, and how unpredictable it is. This guide shows how to measure that and what to do in practice.
In this guide
Entropy: measuring unpredictability
Entropy, measured in bits, describes how many guesses an attacker would need. For a password made of randomly chosen characters, it is the length multiplied by log2 of the number of possible characters. Every extra bit doubles the work. The key word is randomly: a password a human invents is far weaker than the same length chosen by a generator.
Examples (random characters)
8 lowercase letters 8 × log2(26) ≈ 38 bits
12 letters, digits, symbols 12 × log2(94) ≈ 79 bits
16 letters, digits, symbols 16 × log2(94) ≈ 105 bits
20 lowercase letters 20 × log2(26) ≈ 94 bitsLength beats complexity
The last line above is worth noticing: 20 random lowercase letters are stronger than 12 random characters from the full keyboard. Adding length is the cheapest way to add entropy, and long passwords are not harder for software to handle. Symbols and capitals help, but only when they are chosen randomly rather than in predictable places, such as a capital at the start and a number at the end.
Why predictable patterns fail
Attackers do not try every combination in order. They try common passwords, dictionary words, names, dates and common substitutions (a→@, o→0) first, and they run these against stolen password databases at enormous speed. A password that follows a pattern gives the attacker a huge shortcut, no matter how many character types it contains.
Passphrases
A passphrase is several random words, such as four to six words picked by a generator from a list of thousands. If a list has 7,776 words, each random word adds about 12.9 bits, so six words give roughly 77 bits. Passphrases are easier to type and remember than a random string, which makes them a good choice for the few secrets you must remember, such as the master password of a password manager. The words must be chosen randomly, not picked by you from a favourite quote.
One password per site
The most damaging habit is reusing a password. When one site is breached, attackers try the same email and password on other services. Use a different, random password for every account and let a password manager remember them. A manager is also protection against phishing, because it will not fill a password on a look-alike domain.
Add a second factor
Even a strong password can be phished or leaked. Turn on two-factor authentication for important accounts such as email, banking and cloud services. Passkeys and hardware security keys are the most resistant to phishing, followed by authenticator-app codes. SMS codes are better than nothing but weaker.
What current guidance says
The US standards body NIST, in its digital identity guidelines (SP 800-63B), recommends favouring length, allowing long passwords and passphrases, and checking new passwords against lists of known breached or common passwords. It advises against forced composition rules and against forcing regular password changes without a reason, because those habits push people toward weak, predictable passwords.
How a good generator works
- It uses a cryptographically secure random source, such as the browser crypto.getRandomValues, never Math.random, which is not designed for security.
- It picks each character independently and without bias.
- It runs on your device, so the password is not sent anywhere.
- It lets you choose a long length (16 characters or more) and the character types the website accepts.
A practical checklist
- Use a password manager and generate a random password of 16+ characters for every account.
- Use a random passphrase of 5–6 words for the manager itself and your device login.
- Enable two-factor authentication or passkeys on important accounts.
- Change a password if a service reports a breach, not on a fixed timer.
How attackers actually guess passwords
There are two situations. In an online attack, the attacker tries guesses against the real login page, which can be slowed down by rate limits and lockouts. In an offline attack, the attacker has stolen a database of password hashes and can try guesses on their own hardware, as fast as it can run, with no limits. Websites defend against this by storing passwords with deliberately slow hashing functions such as bcrypt, scrypt or Argon2, but you cannot see whether a site does so. A long random password protects you in both cases.
A third method, credential stuffing, tries email and password pairs leaked from one site on many others. It needs no guessing at all, which is why a unique password per site is so important.
Checking whether a password has leaked
Services such as Have I Been Pwned offer a "Pwned Passwords" check. It uses a technique called k-anonymity: your device computes a hash of the password and sends only the first five characters of it, and the service replies with all known leaked hashes that start with those characters. The comparison is done on your device, so the password itself is never sent. Many password managers and websites use this to warn you when a password is known to be exposed. A password that appears in these lists should not be used, however complex it looks.
Frequently asked questions
- Is it safe to use an online password generator?
- Only if it creates the password on your device using a secure random source and does not send it anywhere. The Password Generator on this site runs in your browser using crypto.getRandomValues() and avoids statistical bias when choosing characters. Whatever tool you use, never type a real password into a generator that works by sending a request to a server.
- Do I need special characters?
- Only if the site requires them. Each extra character of length adds more strength than a symbol does. When a site does require a symbol, a generator can include one without making the password predictable.
- How often should I change my password?
- Not on a fixed schedule. Change a password when you have a reason: a breach notice, a suspicious login, or a password that was shared or reused. Forced regular changes often lead people to pick weaker, predictable passwords.
- Is writing passwords down acceptable?
- A password manager is better for most people. A written note kept somewhere physically secure at home is a lesser risk than reusing one memorable password everywhere, but it does not help when you are away from home.
Sources and further reading
Try it yourself: Password Generator runs in your browser, free and with no sign-up.