Developer Tools

How to Create a Strong Password: Length, Randomness and What NIST Recommends

Why a long random password beats a short complicated one, how many bits of entropy you actually need, what the 2025 NIST guidelines changed, and how to create and store passwords safely.

By Published 5 min read

Most password advice is about character rules: one capital letter, one number, one symbol. Attackers don’t care much about those rules. What protects you is how many guesses it takes to find your password, and that depends almost entirely on two things: how long it is and how randomly it was chosen.

Why “P@ssw0rd!” is weak

Password-cracking programs don’t try every combination blindly. They start with lists of passwords leaked in earlier breaches, dictionary words, names and dates, and then apply the changes people typically make: a becomes @, o becomes 0, a capital letter at the start, a digit or an exclamation mark at the end. A password built that way meets almost every complexity rule and is still among the first guesses.

That is why the U.S. National Institute of Standards and Technology (NIST) now tells online services to check new passwords against lists of common and compromised passwords instead of imposing composition rules. More on the guidelines below.

Entropy: measuring strength in bits

For a password chosen at random, strength can be calculated. If each character is picked from a pool of N possible characters, it adds log₂(N) bits of entropy, and a password of length L has L × log₂(N) bits. Every additional bit doubles the number of guesses an attacker needs.

entropy (bits) = length × log₂(pool size)

16 random characters from the 94 printable keyboard characters:
16 × log₂(94) = 16 × 6.55 ≈ 104.9 bits
Calculated with the formula above; valid only for randomly generated passwords.
PasswordEntropy
8 random lower-case letters37.6 bits
8 random characters from the whole keyboard (94)52.4 bits
4 random words from a 7,776-word list51.7 bits
12 random characters from the whole keyboard78.7 bits
6 random words from a 7,776-word list77.5 bits
16 random characters from the whole keyboard104.9 bits
20 random letters and digits (62)119.1 bits

How long would cracking take?

Guessing speed depends on where the attack happens. A website’s login form usually allows only a few attempts per minute. The dangerous case is an offline attack after a data breach, when attackers test guesses against the stolen password hashes on their own hardware. How fast that goes depends on how the service stored the passwords: an outdated, fast hash function can be tested billions of times per second on graphics cards; a deliberately slow one such as bcrypt or Argon2 only thousands of times.

The table shows the average time to find a random password (half of all possibilities) at two speeds. They are illustrative assumptions, not measurements of a specific attacker: 10 billion guesses per second for a fast hash and 10,000 per second for a slow one.

Average time = 2^(bits − 1) ÷ guesses per second.
PasswordEntropyFast hash: 10 billion guesses/sSlow hash: 10,000 guesses/s
8 lower-case letters37.6 bitsabout 10 secondsabout 4 months
4 random words51.7 bitsabout 2 daysabout 5,800 years
8 characters, whole keyboard52.4 bitsabout 3½ daysabout 9,700 years
6 random words77.5 bitsabout 350,000 yearsfar longer
12 characters, whole keyboard78.7 bitsabout 750,000 yearsfar longer
16 characters, whole keyboard104.9 bitsabout 59 trillion yearsfar longer

Around 80 bits puts offline guessing out of reach even against a fast hash. Our Password Generator uses the same scale: below 50 bits it rates a password as weak, from 50 to 79 bits as good and from 80 bits as strong. Its default, 20 characters from all four character sets, gives about 129 bits.

What NIST’s 2025 guidelines say

NIST Special Publication 800-63B-4, finalized in July 2025, is written for U.S. federal systems, but many companies and security teams follow it. For services that check passwords, it says:

  • Passwords used as the only way to log in must be at least 15 characters long; passwords used together with a second factor at least 8.
  • Services should allow at least 64 characters.
  • Services shall not impose composition rules, such as requiring a mix of upper- and lower-case letters, digits and symbols.
  • Services shall not force periodic password changes; a change is required when there is evidence of compromise.
  • New passwords must be checked against a blocklist of commonly used, expected or compromised passwords.
  • Password managers and autofill must be allowed, and pasting should be permitted.
  • Hints that strangers can see and security questions (“your first pet’s name”) are not allowed.

The direction is clear: long, unique and unpredictable beats short and decorated.

Three ways to get a strong password

1. Let a generator choose random characters

A random password of 16 to 20 characters is the best choice for every account stored in a password manager, because you never type it yourself. Our Password Generator creates it in your browser with the Web Crypto API (crypto.getRandomValues) and rejection sampling, so every character is equally likely. It also makes sure that every character set you tick appears at least once, which keeps websites with old composition rules happy. Nothing is sent to a server.

2. Use a random passphrase for passwords you must remember

For the few passwords you have to type, such as your computer login or the master password of your password manager, a passphrase of six or more randomly chosen words is easier to remember and to type on a phone. The important word is randomly: pick the words with dice from a list such as the 7,776-word list published by the Electronic Frontier Foundation (each word adds about 12.9 bits), not from a song, a quote or your own imagination.

3. Store everything in a password manager

Reusing passwords is the biggest risk of all. When one site is breached, attackers try the same email address and password on many others, a technique called credential stuffing. A password manager lets every account have its own random password while you remember just one.

Password GeneratorCreate strong, random passwords with 8–64 characters. Choose letters, digits and symbols and see the estimated strength.Open tool

Beyond the password

  • Turn on two-factor authentication for email, banking and social media. Your email account matters most, because it can reset all the others.
  • Use passkeys where they are offered. A passkey replaces the password with a cryptographic key stored on your device: there is nothing to guess and nothing to type into a fake login page.
  • Check whether a password has leaked. Have I Been Pwned’s Pwned Passwords service checks a password without receiving it: only the first five characters of its SHA-1 hash are sent, and the comparison happens on your side.
  • Change a password when there is a reason, such as a breach notice, a shared device or a click on a phishing link, not on a fixed schedule.

Tools used in this guide

Frequently asked questions

How long should a password be?

At least 15 characters if it is the only protection for an account, which is NIST’s current minimum. If a password manager stores it for you, use 16–20 random characters. For a passphrase you memorize, use six or more random words.

Do I need symbols in my password?

Not if it is long and random. A symbol makes each character slightly stronger (log₂ 94 ≈ 6.55 bits instead of log₂ 62 ≈ 5.95 bits for letters and digits), but adding four more characters adds about 24 bits. Use symbols when a website requires them.

Should I change my passwords regularly?

Only when there is a reason to think a password has been exposed. NIST’s 2025 guidelines tell services not to force periodic changes, because forced rotation leads to predictable variations such as “Spring2026!” followed by “Summer2026!”.

Is it safe to generate a password online?

Yes, if the generator runs locally and uses a cryptographic random number generator. Ours runs entirely in your browser with crypto.getRandomValues; the password is never transmitted or stored.

What does “bits of entropy” mean?

It is the base-2 logarithm of the number of equally likely possibilities. A password with 80 bits is one of 2⁸⁰ (about 1.2 × 10²⁴) possibilities, and an attacker needs on average half that many guesses to find it.

Sources and further reading

  1. NIST SP 800-63B-4: Authentication and Authenticator Management (2025) (csrc.nist.gov)
  2. EFF: New wordlists for random passphrases (www.eff.org)
  3. Troy Hunt: Understanding Have I Been Pwned’s use of SHA-1 and k-anonymity (www.troyhunt.com)
  4. Crypto: getRandomValues() – MDN Web Docs (developer.mozilla.org)
All guides