Why password strength is about patterns, not rules
Many sign-up forms judge a password by rules: eight characters, one capital, one digit, one symbol. Summer2024! passes all of them, yet it is one of the first passwords an attacker tries. Rules measure what a password contains. Attackers care about how predictable it is.
Real password cracking does not try every possible string in order. It starts with leaked password lists, then dictionary words with common changes, then dates, keyboard patterns and short random tails. A password built from those parts falls early, whatever the rules say.
This checker estimates strength the way an attacker would approach it: it looks for the predictable parts first and prices the rest as random characters.
How the estimate works
The checker scans the password for patterns and gives each a cost in bits: roughly how many guesses an attacker needs to find that piece, as a power of two. It then finds the cheapest way to build the whole password from patterns and single characters, and adds up the bits.
| Pattern | Example | How it is priced |
|---|---|---|
| Common password | password, qwerty123 | log2 of the size of a short built-in list, plus a bit for capitals |
| Dictionary word | maple, harbor | log2 of the word list size, plus a bit or two for capitals or symbol swaps |
| Sequence | abc, 4321 | Start character, direction and length |
| Repeat | aaaa, abcabc | The repeated part, plus the number of repeats |
| Year | 1987, 2024 | One of 140 years from 1900 to 2039 |
| Keyboard run | asdf, poiuy | Start key, direction and length |
| Other characters | x7# | log2 of the alphabet size, per character |
Swapped letters such as @ for a or 0 for o are undone before matching, so p@ssw0rd is still recognized as password. Attackers apply the same swaps automatically.
An example: Summer2024!
Summer common password, capitalized ~7.9 bits
2024 year ~7.1 bits
! one character from 95 ~6.6 bits
---------
Pattern-aware estimate ~21.6 bits
If every character were random ~72.3 bitsThe two numbers show the gap between how the password looks and how it behaves. As 11 random characters it would be strong. As a word, a year and a symbol, it is about 22 bits: a few million guesses.
What the numbers mean
Bits translate into guesses: 30 bits is about a billion possibilities, 40 bits about a trillion. The checker turns the estimate into an average time to guess at three rates.
| Attack | Rate used | What it represents |
|---|---|---|
| Online, rate limited | 10 guesses a second | Guessing against a live sign-in page that slows or locks out repeated failures |
| Offline, slow hash | 10,000 guesses a second | A stolen database hashed with PBKDF2, bcrypt, scrypt or Argon2 at sensible settings |
| Offline, fast hash | 10 billion guesses a second | A stolen database of unsalted fast hashes, attacked with GPUs |
These rates are round illustrations, not measurements. Real rates vary by many orders of magnitude with the hardware, the hash and its settings. Use them to compare passwords, not as a promise.
| Estimate | Rating here |
|---|---|
| Under 28 bits | Very weak |
| 28 to 40 bits | Weak |
| 40 to 60 bits | Fair |
| 60 to 80 bits | Strong |
| 80 bits and more | Very strong |
What this checker does and does not do
- It checks the password as you type, entirely in your browser. Nothing is sent or stored.
- It finds common passwords, dictionary words, sequences, repeats, years and keyboard runs, including with simple symbol swaps.
- It shows each part it found and what that part costs, so you can see what to change.
- It is not zxcvbn and does not use its data. It is a smaller, simpler estimator written for this page.
- It cannot tell whether a password appeared in a breach. A leaked password is weak however it scores, because attackers try leaked passwords first.
- Its word list is about 3,000 common English words. Words outside the list, names and other languages are priced as random characters, so the estimate can be too high for them.
How to use the checker
- Type the password, or better, a password of the same shape. The sample filled in is deliberately weak.
- Read the rating and the pattern-aware estimate.
- Look at the parts list. Anything other than "Characters" is a pattern an attacker would try early.
- Read the warnings: short length, a single kind of character, common passwords, words, years, sequences and repeats.
- Change the password and watch the estimate. Adding length usually helps most.
Using it for password policy decisions
The checker is also a teaching aid for the people who set password rules.
Why composition rules fall short
Try Password1!. It meets a typical rule of upper, lower, digit and symbol, and it is still among the weakest passwords there are. NIST SP 800-63B advises against composition rules for this reason and recommends checking new passwords against lists of commonly used and compromised values instead.
What Keycloak can enforce
Keycloak’s password policy can require a minimum and maximum length, digits, lowercase and uppercase letters, special characters, a password different from the username and email, and a history of previous passwords not to reuse. It can also reject passwords listed in a file of banned passwords.
A sensible combination is a generous minimum length, a banned-password list built from common and breached passwords, and no extra composition rules beyond what your users can live with.
Online attacks and brute force detection
Keycloak can detect brute force attacks per realm, under Security defenses, and temporarily or permanently lock out a user after repeated failures. With sensible settings that slows online guessing to a handful of attempts before each wait, which is why even fair passwords survive online attacks. The offline rates matter if a database backup ever leaks.
Common mistakes the checker catches
- A word with a capital at the start and a digit or symbol at the end.
- A year, often the current one or a birth year.
- Keyboard runs such as
qwerty,asdfghor1qaz2wsx. - Symbol swaps such as
P@ssw0rd, which crackers undo automatically. - Repeated blocks such as
abcabcor121212. - Short passwords. Under 12 characters there is little room for real randomness.
Security notes
The checker runs locally and sends nothing, but the safest habit is not to type a real password into any web page. Test a password of the same shape instead: same kinds of parts, different content.
A strength score is only half the picture. The other half is how the password is stored. A strong password hashed with plain SHA-1 or MD5 is far easier to crack than the same password stored with a slow, salted function.
And no password replaces a second factor. A phished password is just as useful to an attacker whether it scored weak or strong.
Best practices for strong passwords
- Let a password manager generate random passwords for every site.
- For the few passwords you must remember, use a random passphrase of six words or more.
- Never reuse a password across sites.
- Turn on a second factor, or use passkeys where offered.
- For admins: enforce length and a banned-password list, enable brute force detection, and store passwords with a slow hash.