Security

How to choose and test a strong password

There is one honest measure of password strength, and only one: entropy, counted in bits. The catch is that it does not measure the string you typed, it measures the process that produced it. That is why “P@ssw0rd!” is weak despite its nine characters with an uppercase, a digit and a symbol: it is the word “password” with the exact swaps every cracking program tries first, so its real entropy is a handful of bits, not the ~59 the naive count suggests. This guide derives the entropy formula, shows why the “complexity rule” makes passwords worse, why [NIST reversed its own playbook](https://pages.nist.gov/800-63-4/sp800-63b.html) and what to do after you choose. Test as you read in the [password strength auditor](tool:analisador-senha), it computes everything in your browser, sending nothing to any server.

J-Kit17 min readIntermediate
  • Passwords
  • Entropy
  • NIST 800-63B
  • Authentication
  • Security

Key takeaways

  • Entropy measures the generation process, not the string. “P@ssw0rd!” looks like ~59 bits, but as a dictionary word with obvious swaps, its real entropy is a handful of bits.
  • Length is the lever: a 6-word Diceware passphrase (~77.5 bits) rivals a random 12-character symbol password (~78.8 bits) and is still memorable.
  • NIST SP 800-63B-4 (2025) reversed the playbook: a 15-character minimum for single-factor, no composition rules, no periodic expiration and comparison against breached-password lists.
  • After choosing: a manager, one unique password per site, a slow salted hash on the server and a second factor, preferably a passkey (phishing-resistant), then TOTP.

Entropy: the only honest measure

A password’s strength is the number of tries an attacker needs, on average, to guess it. Counting that number directly is unwieldy, so we take its base-2 logarithm, entropy, in bits. Each bit doubles the search space: 40 bits is about a trillion combinations; 80 bits is a trillion trillions. The point almost every tutorial gets wrong is this: entropy is not a property of the string. It is a property of the process that generated it. The same sequence of characters can be worth 3 bits or 60, depending on how you arrived at it.

H = L × log2(R)
H
entropy, in bits (the log of the number of combinations)
L
length, number of drawn symbols (characters or words)
R
size of the alphabet each symbol is drawn from
Entropy of a randomly generated password. It holds ONLY if each of the L symbols is drawn uniformly and independently from an alphabet of size R. A human-invented password almost never meets that assumption, and its real entropy is far lower.

The formula falls out of counting combinations: if you draw L independent symbols, each from a set of R options, there are R^L possible passwords, and log2(R^L) = L × log2(R). Notice the word “draw”. The count only holds under uniform randomness, a die, a cryptographic generator, never your head. When a person chooses, they pile probability onto a tiny set of outcomes (names, dates, the capital-first-number-last pattern), and the attacker starts there. Real entropy becomes the log of your password’s position in a good attacker’s guess list, not the log of the theoretical set size.

8 lowercase37.6 bits
8 alphanumeric47.6 bits
12 with symbols78.8 bits
4 Diceware words51.7 bits
6 Diceware words77.5 bits
Bits of entropy per generation strategy, computed with H = L × log2(R) assuming uniform draws. Lowercase R=26, alphanumeric R=62, with symbols R=95, Diceware word R=7,776.
View the data
CategoryValue
8 lowercase37.6 bits
8 alphanumeric47.6 bits
12 with symbols78.8 bits
4 Diceware words51.7 bits
6 Diceware words77.5 bits

The chart tells the whole story. Eight random lowercase characters give just 37.6 bits, inside the “weak” band of any meter. Adding character types helps (alphanumeric climbs to 47.6), but the big jump comes from length: twelve characters with symbols reach 78.8 bits, and, the counterintuitive part, six random words from a Diceware list reach almost the same (77.5 bits) while being far easier to remember. Now the example that opens the article, with the numbers spelled out.

// "P@ssw0rd!" tratada como aleatória / treated as random
L = 9 caracteres, R = 95 (minúscula + maiúscula + dígito + símbolo)
H = 9 × log2(95) = 9 × 6,5699 ≈ 59,1 bits   ← o que a conta ingênua diz

// "P@ssw0rd!" como o que realmente é / as what it actually is
base = "password"  (entre as ~20 senhas mais vazadas do mundo)
regra = capitaliza + a→@ + o→0 + acrescenta "!"  (a mangling mais comum)
um ataque de dicionário+regras chega nela em ~16 tentativas
H_real ≈ log2(16) ≈ 4 bits   ← o que um atacante realmente gasta
The same string, two numbers: ~59 bits if it were random, ~4 bits because it is not. The “~4” is the order of magnitude of the password’s rank in a good attacker’s list and depends on the list; the point is the fifteenfold gap between how it looks and what it is.

Why length beats complexity

In the formula, length and alphabet enter differently. Growing the alphabet R raises the base once: going from lowercase (26) to all printable symbols (95) multiplies the space by a fixed factor, and that is it. Growing the length L raises the exponent, and you can do that with no ceiling. Each extra random character multiplies the whole space by R again. That is why complexity runs out fast and length does not.

Entropy (bits) by character set and length, with H = L × log2(R). The values match what the [password strength auditor](tool:analisador-senha) uses: lowercase 26, uppercase 26, digits 10, symbols 33 (95 printable in total).
Character setR8 characters12 characters16 characters
Lowercase only2637.656.475.2
+ uppercase5245.668.491.2
+ digits6247.671.595.3
+ symbols9552.678.8105.1

Read the table diagonally. Every symbol on the keyboard adds at most about 22 bits to a 12-character password (from 56.4 lowercase to 78.8), and charges that price in memorization and typos. Four extra lowercase characters (from 12 to 16) add 18.8 bits, and nothing stops you adding another four, and four more. A 16-character lowercase password (75.2 bits) already beats any 8-character password, however many symbols it holds (52.6 bits). Complexity is a one-time bonus; length is a treadmill that never ends.

Diceware passphrase: easy to remember, hard to crack

If random length wins, the challenge is generating length a human can remember. The answer is Diceware, published by Arnold Reinhold in 1995: you roll five six-sided dice, read the result in a numbered list and get a word; repeat a few times and join the words. Because each word comes from a list of exactly 6^5 = 7,776 entries, each one adds log2(7,776) ≈ 12.9 bits, and, crucially, those bits are real because the draw is uniform (dice have no preferences). The EFF long list, from 2016, holds those 7,776 words chosen to be common, easy to type and with no word a prefix of another.

7,776 words
The list size, equal to 6^5, the number of outcomes of five six-sided dice, so one roll yields one word without bias.
≈ 12.9 bits per word
log2(7,776). That is how much entropy each drawn word adds, provided it is genuinely drawn, with dice or a cryptographic generator.
Prefix property
No word in the EFF list is the start of another, so the passphrase reads unambiguously even written without spaces.

It is worth comparing head to head a six-word passphrase against a random twelve-character password, the other popular extreme:

// Passphrase Diceware de 6 palavras / 6-word Diceware passphrase
H = 6 × log2(7776) = 6 × 12,925 ≈ 77,5 bits
exemplo: "correto-cavalo-bateria-grampo-limao-trilho"

// Senha aleatória de 12 caracteres com símbolos / random 12-char with symbols
H = 12 × log2(95) = 12 × 6,5699 ≈ 78,8 bits
exemplo: "9x!Kd2#vQ7@m"

// Praticamente empatadas em bits, mas só uma delas você decora.
Six words (~77.5 bits) tie with twelve symbol characters (~78.8 bits). The difference is not in strength: it is in which one you can remember and type without a mistake.

What NIST changed, and why

The “complexity rule”, at least one uppercase, one digit and one symbol, change the password every 90 days, did not fall from the sky. It has an author and a date, and the very agency that popularized it has since abandoned it. The document that defines best practice today is NIST SP 800-63B, whose current revision is SP 800-63B-4, finalized in July 2025. It dismantles, item by item, the playbook we taught for twenty years.

  1. 2003The complexity rule is born

    A NIST appendix (SP 800-63, a memo attributed to Bill Burr) recommends mixing character types and changing passwords often. It becomes corporate law worldwide.

  2. 2017Revision 3 walks it back

    SP 800-63B (rev. 3) drops composition rules and periodic expiration, based on research showing they produced worse passwords. Burr publicly admits he regretted the original advice.

  3. 2025SP 800-63B-4 consolidates

    The fourth revision, final, raises the recommended minimum to 15 characters when the password is the only factor, requires comparison against breached-password lists and reinforces that composition rules and periodic expiration must not be imposed.

Old playbook × current NIST SP 800-63B-4 recommendation (§3.1.1.2), with the reason for each change.
TopicOld ruleNIST SP 800-63B-4Why
Minimum length8 characters15 minimum for single-factor; 8 if part of MFALength is what raises entropy the most.
CompositionRequire uppercase + digit + symbolShall not impose composition rulesThey push everyone to “Password1!”, cutting real entropy.
ExpirationChange every 60–90 daysNo periodic change; only on evidence of compromiseForced change breeds predictable variants (pass1→pass2).
Maximum lengthShort caps; ban spacesAllow at least 64 characters and all printable onesEnables long passphrases and Unicode.
BreachesNot checkedCompare against a blocklist of common/breached passwordsBlocks the very passwords the attack tries first.

The logic behind every row is the same one that opens this guide. Composition rules and forced changes do not add randomness, they restrict human behavior to patterns, and patterns are what an attacker maps first. Requiring a symbol makes almost everyone put it at the end; requiring a quarterly change makes almost everyone increment a number. NIST swapped “force the user to complicate” for “let the user lengthen and block what has already leaked”. That is the difference between fighting the attacker’s math and feeding it.

How to test (and what the meter computes)

An honest meter does not count characters: it estimates entropy and then subtracts the bits the password gives away for free. This site’s password strength auditor does exactly that, and it helps to know what it computes underneath, it is not Dropbox’s zxcvbn, but a lighter cousin in the same spirit. First it estimates naive entropy from the detected character set (length × log2 of the set size). Then it applies penalties: it subtracts bits when it sees sequences, repeats, keyboard patterns, dates and leetspeak of common words, and it zeroes the score when the password appears in an embedded list of the most-leaked ones. zxcvbn, presented by Daniel Wheeler at USENIX Security 2016, takes the idea further, matching the password against dictionaries and estimating the guess count of several real attacks; the lesson common to both is the same: strength is the log of the guesses a good attacker spends, not the log of the theoretical set size.

The entropy bands used to rate the password. These are exactly this site’s auditor cutoffs.
Entropy (after penalties)Rating
under 28 bitsVery weak
28–39 bitsWeak
40–59 bitsFair
60–89 bitsStrong
90 bits or moreVery strong
Test here, in the browser: type a password with a pattern similar to yours and see the estimated entropy, the detected patterns and the crack time per attacker type. Nothing leaves your device.Open the tool full page
Why composition rules make passwords worse

A rule like “needs an uppercase, a digit and a symbol” does not force anyone to be random, it forces them into a shape. And under pressure, almost everyone follows the same one: capitalize the first letter, pick a word, append an obvious number and end with “!”. The result is “Summer2026!” repeated across millions of accounts. The attacker need not try every 10-character combination; they just generate common words inside that mold, a space thousands of times smaller.

That is why SP 800-63B-4 says “shall not” to composition rules. They give the human a sense of strength and hand the machine predictability, the worst of both worlds.

How to check if a password leaked without handing it over (k-anonymity)

The Have I Been Pwned service keeps an index of over half a billion passwords already seen in breaches. You could ask “is mine in there?”, but sending the password to a website defeats the purpose. The fix is the k-anonymity model: your device computes the SHA-1 of the password locally and sends the API only the first five hexadecimal characters of that hash. The server returns every hash suffix that begins with that prefix (hundreds of them) and how many times each appeared. Your side finishes the comparison: if your hash suffix is in the list, the password leaked.

The server never sees the password or the full hash, only a prefix shared by hundreds of different passwords, so it cannot tell which was yours. It is the same blocklist check NIST requires, done without trusting the password to anyone.

TOTP vs. passkey: why the second factor matters

The six-digit code from your authenticator app is a TOTP, defined by RFC 6238: an HMAC of the shared secret with the current time split into 30-second windows (an extension of the counter-based HOTP from RFC 4226). It is far better than SMS, but it has a blind spot: real-time phishing. A fake site asks for your password and the code; you type them; the attacker relays both to the real site within the 30 seconds and gets in. The code is valid, it was just typed in the wrong place.

Passkeys (WebAuthn, from the W3C, part of FIDO2) close that hole. Instead of a code you relay, the browser signs a challenge with a private key that never leaves the device, and the signature is bound to the origin (the real domain) of the site. A clone site has a different origin, so the signature is worthless there. There is no secret to type in the wrong place, that is why a passkey resists phishing by construction, and TOTP does not.

  • Prioritize length: 15+ random characters or 5–6 drawn Diceware words.
  • Do not rely on leetspeak or the capital-first-number-last pattern.
  • One unique password per site, kept in a manager, never reuse.
  • Check whether it has leaked (via k-anonymity) and avoid any blocklisted password.
  • Turn on a second factor: a passkey preferably, then an app TOTP; avoid SMS.
  • Only type real passwords into local tools that send nothing to a server.

After choosing: store and reinforce

Choosing a good password is half the job; the other half is how it lives on both sides. On yours, use a manager to keep one long, unique password per service, generated by the password generator, so one site’s leak does not poison the others. On the storing side, the password must never sit in plain text: it becomes a salted hash via a deliberately slow function (bcrypt, scrypt, Argon2), as the bcrypt generator shows. The hashing, encryption and encoding guide explains why that slowness is a defense, not a defect.

This is where crack time earns its meaning, and where it is easy to invent a number. This site’s auditor estimates the time by dividing the needed guesses across attacker profiles: a throttled form (about 100 tries per hour), an unthrottled service (tens per second), a slow offline hash (~10 thousand/s, the case of a well-tuned bcrypt), a fast hash on a GPU (~10 billion/s) and a GPU cluster (~1 trillion/s). Those are the meter’s 2026 reference profiles, not a benchmark of any specific card, real speed depends entirely on the server’s password-hash algorithm. A high-cost bcrypt is orders of magnitude slower to attack than raw SHA-256, which is why the hash choice matters as much as the password choice. For scale: a 77.5-bit passphrase needs, on average, about 2^76.5 ≈ 10^23 guesses; even at cluster pace (10^12/s), that runs into thousands of years. The 37.6 bits of eight lowercase characters, on the same cluster, fall in a fraction of a second.

Finally, turn on two-step verification. Even if a password leaks, a second factor blocks access, but not every second factor is equal. Prefer a passkey, which resists phishing by binding the signature to the site’s origin; where it is not available, use an app TOTP code, like the TOTP generator’s, rather than SMS, which can be diverted by a SIM swap. It is the layer that turns a leak into a scare, not a breach, the same defense-in-depth logic that shields a whole domain in the SPF, DKIM and DMARC guide.

Frequently asked questions

Do symbol substitutions make a password strong?
Almost nothing. Cracking tools like hashcat and John the Ripper have rules that automatically generate leet swaps (a→@, o→0, s→$) over every dictionary word. “p@ssw0rd123” costs practically the same as “password”. You gain far more strength by adding random length than by swapping predictable characters.
What minimum length does NIST recommend today?
In the current revision, SP 800-63B-4 (final in 2025), the minimum is 15 characters when the password is the only authentication factor; it may be 8 if used only as part of a multi-factor scheme. The document also recommends allowing at least 64 characters, so long passphrases are not blocked.
Do I need to change my password every 90 days?
No. SP 800-63B-4 explicitly says periodic password change must not be required; a change should only be forced when there is evidence of compromise. Calendar-based mandatory changes lead people to create predictable variants (pass1, pass2), which weakens rather than strengthens.
How many bits of entropy are “safe”?
As a reference, above ~80 bits brute force is infeasible even for large clusters; this site’s auditor marks “very strong” from 90 bits and “weak” below 40. A 5–6 drawn-word Diceware passphrase reaches that level comfortably (5 words ≈ 64.6 bits; 6 ≈ 77.5).
How do I know if my password leaked without handing it to a site?
Through Have I Been Pwned’s k-anonymity model: your device computes the password’s SHA-1 and sends only the first five characters of the hash. The server returns the suffixes that begin with that prefix, and the final comparison happens on your side. The service never sees the password or the full hash, and the prefix is shared by hundreds of passwords, so it cannot tell which one was yours.
TOTP or passkey: which is more secure?
A passkey (WebAuthn/FIDO2) is more secure because it resists phishing: the browser signs a challenge with a key that never leaves the device, bound to the site’s origin, so a clone cannot obtain a valid signature. TOTP (RFC 6238) is good and far better than SMS, but the 30-second code can be relayed by a fake site in real time. Use a passkey where you can; TOTP as a second choice.
Is it safe to type my password into an online tester?
Only if the computation is local, in the browser, sending nothing to a server, which is the case for this site’s password strength auditor. When in doubt, test a password of a similar pattern to the real one instead of the real one, or use tools that make clear nothing leaves the device.

Entropy is the only honest ruler, and it measures how the password was generated, not the string, which is why “P@ssw0rd!” is worth a handful of bits. Prioritize random length (15+ characters or 5–6 Diceware words), ignore the composition rules NIST itself abandoned and do not rely on leetspeak. After choosing, use a manager, a unique password per site, a slow salted hash on the server and a second factor, preferably a passkey.

Sources & references

  1. NIST SP 800-63B-4, Digital Identity Guidelines: Authentication (current revision, 2025)
  2. EFF, New Wordlists for Random Passphrases (long list, 7,776 words)
  3. Wheeler, zxcvbn: Low-Budget Password Strength Estimation (USENIX Security 2016)
  4. Have I Been Pwned, Pwned Passwords API (k-anonymity model)
  5. RFC 6238, TOTP: Time-Based One-Time Password Algorithm
  6. RFC 4226, HOTP: An HMAC-Based One-Time Password Algorithm
  7. W3C, Web Authentication (WebAuthn) Level 2