XKCD password generator

Four random common words, as xkcd #936 suggested, generated in your browser. Then see why today's defaults use a few more.

The comic, in numbers

Randall Munroe's 2011 strip compares two passwords. Tr0ub4dor&3 looks complicated but follows a common pattern (a dictionary word, predictable substitutions, a digit and a symbol on the end), which he rates at about 28 bits. correct horse battery staple is four random words from about 2,048 common words: 4 × 11 = 44 bits. That's roughly 65,000 times more guesses (216), and far easier to remember.

SetupPer word4 words6 words
xkcd's assumed list (2,048)11.0 bits44.0 bits66.0 bits
EFF short list (1,296)10.3 bits41.4 bits62.0 bits
EFF long list (7,776)12.9 bits51.7 bits77.5 bits

What has changed since 2011

The comic's attacker guesses 1,000 times a second, a sensible model for an online login. When a site's password database leaks, attackers can guess offline, and against a fast hash on modern GPUs that can mean billions of guesses a second. Four words is thin in that case. Well-run sites use slow hashes like bcrypt or Argon2 that cut the rate dramatically, but you can't tell from the outside. So add a word or two: every extra EFF word multiplies the work by 7,776.

Drag the numbers yourself in the passphrase entropy calculator, or read passphrase vs password for the longer comparison.

Questions

What does "correct horse battery staple" mean?

It is the example passphrase from xkcd comic #936, "Password Strength", by Randall Munroe (2011). The comic argues that four random common words are both easier to remember and harder to guess than a short password with character substitutions like "Tr0ub4dor&3".

Is correct horse battery staple itself a good password?

No. It is one of the most famous passphrases in the world and sits in every cracking dictionary. The lesson is the method: let a random process pick the words for you.

Was the xkcd maths right?

Yes, for its assumptions. The comic gives 44 bits for four words, which means picking from 2,048 words (11 bits each). The EFF long list has 7,776 words, so four words give 51.7 bits. The comic assumed 1,000 guesses per second against a web login. Against a leaked database with fast hashing, 44 bits falls quickly, which is why this page defaults to more words.

How many words should I use today?

Four was the comic's example, not a recommendation for every use. Use five words from the EFF long list for ordinary accounts and six or more for a password-manager master password or disk encryption.