Back to the tool

Why Do Some Websites Limit Password Length? (And Why They Should Not)

I generated a 6-word passphrase here once and tried to paste it into a signup form. The form bounced it back: maximum 20 characters. Twenty. A 6-word diceware passphrase is around 42 characters, and this site would not even take half of it.

Here is the honest answer up front. Almost none of the reasons sites cap password length are good ones. Exactly one is legitimate, and the rest is old infrastructure and habit.

The legitimate reason is bcrypt. A lot of systems hash passwords with bcrypt, and bcrypt silently ignores everything past 72 bytes. A site that lets you set a 100-character password but hashes it with bcrypt has really given you a 72-byte password while telling you it accepted 100 characters. A stated maximum around 64 to 72 characters in that setup is honest. An unstated truncation is not. When you see a cap in the 64 to 128 range, someone probably knew about this trap and let the cap do the truncating instead of the hash function.

The legacy reasons, ranked by honesty

The most common real reason is old infrastructure. Older authentication systems were built with fixed-width fields, mainframe habits, or database columns sized for a different era. Changing the field means a schema migration across services written before anyone thought users would want 40-character secrets. Nobody wants to own that migration, so the 20-character cap from 2004 survives on the signup page in 2026.

Then there is hash-cost denial of service, which is a real attack with a small fix. Slow hashing is the whole point of bcrypt, Argon2, and PBKDF2: each guess costs real CPU time. It also means an attacker can submit a megabyte-long password and force the server to chew on it. Some frameworks now reject absurdly long passwords outright to stop that. A cap in the hundreds of characters is a reasonable guard against it. A cap at 20 is guarding nothing.

What comes after that is pure copy-paste inertia. Developers limit passwords to some number because other sites limit passwords to some number, and at the bottom of that chain sits a 1990s-era assumption that long inputs were a buffer overflow risk. The original reason died decades ago. The number survived.

Last is the UX excuse. Long passwords are miserable to type on TV remotes and set-top boxes, and plenty of sites decided the answer was to cap everyone. The remote makes typing hard, which has nothing to do with how long the secret should be. People with password managers never type anything anyway.

What the standards say about maximum password length

So what do the actual standards say about maximum password length? NIST SP 800-63, the password guidance most of the industry claims to follow, tells verifiers to accept passwords up to 64 characters or more and warns against silent truncation. OWASP's cheat sheet lands around the same place, suggesting a practical maximum of 128 characters. The direction is unambiguous: minimum lengths matter, maximums should be generous, and the thing to avoid is truncating without telling the user.

What does this mean for your passphrase? A 6-word diceware passphrase lands around 40 to 45 characters. That fits under every sane cap in existence: 64, 72, 128, all of them. The caps that hurt are the legacy ones: 20, 16, sometimes 12. When you hit one of those, you have two choices. Shorten the phrase, since 4 words at around 28 characters clears a 32-character cap, and accept the tradeoff. Or take the hint. A site that still caps passwords at 20 characters is telling you exactly how modern its security stack is. Act accordingly.

One more aside, since the TV excuse above is the only one with a human being in it. If you have ever pecked out a Wi-Fi password on a streaming stick remote, you know the pain is real. The answer is a shorter dedicated phrase for the TV, not your one long everything-phrase. Different credential, different job.

Frequently asked questions

Is a maximum password length bad for security?

A low maximum is. Caps at 20 or 32 characters rule out passphrases entirely, which pushes people toward short dense passwords that are harder to remember and easier to crack. A high cap, 64 to 128 characters, costs you nothing and guards against hash-function quirks like bcrypt's 72-byte truncation.

Why does bcrypt only use 72 bytes of my password?

That is how the algorithm was specified. It was designed in an era when 72 bytes seemed like more than anyone would ever need, and changing it now would break every existing bcrypt hash. Modern systems can pre-hash the password with SHA-256 before bcrypt, which removes the limit entirely.

What is the safest maximum length a site should set?

NIST SP 800-63 says verifiers should accept at least 64 characters, and OWASP suggests a practical maximum around 128. Anything below 40 actively blocks passphrases. The critical rule is no silent truncation: if you cap it, say so.

My bank limits passwords to 16 characters. Is that a red flag?

It is a strong signal that their authentication stack is old. You cannot fix their stack, so use their password manager friendly maximum of 16 random characters, turn on every alert they offer, and keep your real secrets, the password manager master password and the disk encryption passphrase, long and elsewhere.

Related reading: Passphrase, But the Site Demands Special Characters: What Actually Works · How Many Words Does Your Passphrase Need? Entropy Math, Worked Out · Can You Put Spaces in a Password? · How Do You Type a Long Passphrase on a Smart TV? · Words to Avoid in a Passphrase: the Short Blacklist

Try the tool

A 6-word passphrase is around 42 characters, well under every sane cap. Generate a passphrase here, offline, in your browser. Nothing is sent anywhere.

Get new free tools by email

Want the next guide in your inbox? I publish one practical guide per new tool. Subscribe to the free newsletter on Substack. No spam, unsubscribe anytime.