Free · runs in your browser

XKCD Style Password Generator

XKCD Style Password Generator. Set your word count and click Generate Password to build an XKCD-style password from plain, memorable words. Generate exactly what you need with the free passphrase generator, no account, install, or sign-up required.

Your values
Words

A bigger list adds more bits per word. The 2,048-word list matches the original xkcd comic.

Enter a number between 2 and 10. Four is the xkcd comic's choice; five or six suits a master password.

Shorter words are faster to type but shrink the word pool.

Must be at least the minimum length.

Transformations

Only the random option adds entropy (1 bit per word); the others are predictable patterns.

Separator

Enter exactly 1 character, e.g. - _ . , ; / ~ ! @ # $ %

Padding

Random digits added before the first word. Each adds about 3.32 bits.

Random digits added after the last word. Each adds about 3.32 bits.

Fixed adds a set number of symbols to each end; adaptive pads the end up to an exact length (a longer password is left as it is).

Output

Enter the number of passwords to generate.

Show passwords as

Result

Your xkcd-style password
—
All passwords (bulk text)
—
Length
—
Strength
—
Entropy (blind brute force)
—
Entropy (seen, with full knowledge of the settings)
—
Bits per word
—
Words in the pool after length filter
—
Number of possible passwords
—
  • No account, no logging
  • Open formulas explained below
  • Works offline once loaded

Tired of passwords you can never remember and a computer can still crack? This xkcd style password generator strings together random, common words so your next login is hard to guess but easy to remember, and it shows exactly how many bits of strength you are getting.

XKCD Style Password Generator: What the Comic Got Right

The idea comes from a single webcomic. In it, a tangled string like "Tr0ub4dor&3" earns roughly 28 bits of strength yet is miserable to recall, while the phrase "correct horse battery staple" earns about 44 bits and is nearly impossible to forget. You can read the original password strength comic yourself. Every time you press the button, an xkcd style password generator repeats that trick: it draws words at random from a fixed list and joins them together, so the result is a passphrase instead of a jumble of symbols.

The comic's arithmetic comes straight from information theory. A list of 2048 words gives you 11 bits for every pick, so four picks give 44 bits. What matters is that each pick is truly random and independent, never chosen by you because it "feels" secure. A human-chosen phrase such as a song lyric is far weaker than the same number of machine-picked words.

Four Random Common Words

The comic's recipe is to pick four random common words and let a mental picture glue them together. Common words matter because you must be able to spell and recall them, and a single dictionary word on its own is the weakest possible password. Putting several together changes everything: each additional word multiplies the number of possible results, which makes guessing exponentially harder while adding only a few seconds of typing.

Why Length Beats Complexity

For years, rules told you to swap letters for digits and add a symbol. Those tweaks add very little unpredictability, because attackers already try them, and they make a password painful to memorize. Length is the better lever. That is the whole password scheme behind an xkcd-style password, and why xkcd-style passwords suit people. A memorable phrase of random words is easy to remember because your brain stores it as a story, not as a string of unrelated characters.

Passphrase Entropy and Password Strength Explained

Every passphrase has a measurable password strength, and the unit is entropy: the amount of uncertainty an outsider faces when guessing. Higher entropy means a longer search. Because each word is drawn independently, the math is a simple multiplication. The free temporary password generator is completely free to use, with no rate limits, watermarks, or hidden restrictions.

$$\text{Entropy (bits)} = N \times \log_{2}(L)$$

Here \(N\) is the count of words and \(L\) is the size of the word list. Our worked example uses a list of 7,776 words, so each pick contributes \(\log_{2}(7776) \approx 12.92\) bits. Six words therefore give \(6 \times 12.92 \approx 77.5\) bits, enough that an attacker would face about 350,000 years of work even while testing ten billion candidates every second.

Formula and waterfall chart showing six random words from a 7,776-word list adding 12.9 bits each to reach 77.5 bits of entropy
Six words from a 7,776-word list build up to 77.5 bits of passphrase entropy.

Bits of Entropy per Word

Each added word is worth the same fixed amount, so you can tune strength like a dial. With the 7,776-word list, a three-word result holds only 38.8 bits, while seven words reach 90.5 bits. For comparison, a fully random ten-character password drawn from 94 printable characters carries 65.5 bits, similar to five words but much harder to hold in your head. The table shows the whole range for our worked example:

Bits of Entropy per Word
WordsBits of strengthAverage time to crack
338.824 seconds
451.72.1 days
564.645 years
677.5350,000 years
790.52.7 billion years

The times assume a fast brute-force attack at ten billion guesses per second, and they use the average case, in which the attacker finds the answer after searching half the possibilities.

Timeline of average brute force cracking time for passphrases of three to seven words, from 24 seconds to 2.7 billion years
Average cracking time at ten billion guesses per second for three to seven random words.

Brute Force Cracking Times

A brute force search simply tries every combination until one fits, so cracking time doubles with every extra bit. That is why the jump from four words to five matters so much more than it looks: it moves the average from days to decades. Remember that the table describes a worst case in which the attacker knows your passphrase came from a generator like this one and knows the exact list it used. Real attackers rarely have that much information.

Settings That Shape Easy-to-Remember Passwords

A good tool lets you generate phrases your way without weakening them, and it should generate sensible results at its default settings too. These choices change how easy-to-remember passwords feel in daily use:

  • Words per phrase: start with five or six; add more for anything protecting money or email.
  • Delimiter: a hyphen, space or dot between words; this helps you read the phrase but adds almost no strength.
  • Capitalization: lowercase, uppercase, random or alternating case to satisfy picky sign-up forms.
  • Word length: a minimum and a maximum letter count so every word is short enough to type quickly.
  • Valid characters: a regex such as [a-z] to keep only plain lowercase words.
  • Random acrostic: force the first letters to spell a chosen word.

Number of Words and Length

Raise the count whenever the account matters more. If a site caps the total length, lower the minimum and maximum letters per word so you can still fit six or seven picks. Never trim a phrase by deleting a word you dislike: choosing for yourself removes the randomness that gives the passphrase its strength.

Choosing a Word List

The word list is the second half of the formula. A bigger list adds bits per word, but only if the words stay familiar. Lists exist for several languages, among them:

  • Spanish
  • German
  • French
  • Italian

Pick the one you speak well; a phrase in your own language is easier to type and recall.

Grid of bits of entropy for four to seven words drawn from word lists of 2,048, 4,096 and 7,776 words
Bits of entropy by number of words and word list size; the outlined cell is the six-word example.

Delimiter, Case and Acrostic Options

Treat these settings as formatting, not as security. Because a fixed separator or a predictable capital letter is known to an attacker, it adds roughly a bit or none. An acrostic is a fun memory aid, yet it narrows the candidate words at each position and therefore trims strength slightly; use extra words to make up the difference.

A Bookkeeper Builds a Six-Word Master Passphrase

A freelance bookkeeper is replacing the master passphrase on their password vault, and the new one has to survive their firm's rule that nothing stored there may rest on a guessable secret. They open the passphrase generator with the full 7,776-word list, but they type with one hand on a phone, so they set the minimum word length to 4 and the maximum to 7 letters. That filter trims the pool to 4,911 words, and the generator now reports 12.26 bits per word instead of 12.92.

First attempt: 5 words, hyphen as the delimiter. The tool prints marble-tidal-vessel-kettle-orchard and a strength line of 61.3 bits. At ten billion guesses per second, the average search runs about 4.5 years. That is fine for a forum login, but this phrase unlocks every client file, and the bookkeeper wants a cushion beyond a single hardware refresh cycle.

  • List size after filtering: 4,911 words
  • Bits per word: 12.26
  • Five words: 61.3 bits, about 4.5 years on average
  • Six words: 73.6 bits, about 22,000 years on average

So they change exactly one input, the word count, from 5 to 6, and press the button again. The new result, ferry-salon-canyon-prize-elbow-glider, reads 73.6 bits. It runs 37 characters including hyphens, comfortably under the 64-character allowance that NIST SP 800-63B tells verifiers to accept for memorized secrets, so the vault will not truncate it. Their next step is concrete: type it five times from memory over two days before deleting the paper note, and keep the five-word version only as a throwaway practice phrase.

Run a Scriptable Passphrase Generator from the Command Line

Developers often prefer a terminal. A flexible, scriptable tool called xkcdpass is written in Python and installs with pip install xkcdpass. It runs from the command line with no arguments and will generate one phrase using its default settings:

$ xkcdpass --numwords=6 --delimiter='-' --count=3

That command prints three six-word passphrases joined by hyphens. Useful options include the following:

--wordfile
Point the tool at your own file of allowed words; the wordfile can hold any language.
--min and --max
Set the minimum and maximum letters per word.
--interactive
An interactive mode that offers phrases until you accept one.
--acrostic
Spell a chosen word with the first letters of each pick.

If you would rather read the source code than trust a black box, open it: a short program is simple to audit, and a browser version written in JavaScript works the same way.

Why a Secure Password Generator Needs Real Randomness

Strength numbers only hold when every pick is unpredictable. A weak number generator quietly destroys the guarantee, and that is the most common failure in homemade tools.

Cryptographically Secure Random Number Generator

Programming languages ship two kinds of random source. The everyday kind, such as Math.random() in JavaScript, is built for games and animations and can be predicted after seeing a few outputs. A cryptographically secure source is designed so that nobody can guess the next value, and it is the only suitable choice for a random number generator that creates credentials. When you evaluate any secure tool, check which source it uses before you trust the result. In a phrase builder, every word index must come from that secure source; if it does not, the 12.92 bits per word in the formula above stop being true.

Common English Words and the Dictionary

A list built from common English words keeps every pick recognizable. An obscure dictionary fills the list with words nobody remembers, which defeats the purpose and pushes people back toward writing passwords on sticky notes.

Using and Storing Your Generated Passphrases

Generating a phrase is half the job; the rest is how you use it. The most important rule is that each account gets its own passphrase, because reuse lets one breach unlock everything else. Most real web service logins add rate limits, so an online attacker never reaches ten billion guesses a second. Offline attacks are the scary case: if a site's database leaks and the passwords were hashed carelessly, a stolen hash can be tested on GPUs at enormous speed. Strong password hashing, with a slow algorithm built for the job, is the site's side of the bargain; a long random passphrase is yours.

Keep a few memorized phrases for the logins you type every day, such as your device and your password manager, then let a manager like KeePass hold the rest. Do not choose from the most common passwords lists, which are always the first guesses tried. If you want extra margin for a high-value account, add a seventh word instead of inventing a clever twist. Taken together, these habits make security a matter of arithmetic and routine, not of luck, and they keep your passwords safe from computer-driven guessing.

Frequently Asked Questions

What's the actual idea behind the xkcd 936 method?
The comic's core argument is that a long string of common words (like "correct horse battery staple") has far more entropy than a short, complex-looking password (like "Tr0ub4dor&3"), while being dramatically easier for a human to remember — length beats forced complexity, because entropy scales with the number of possible combinations, not how "random-looking" the result is.
Why lowercase and no symbols by default?
That matches the comic's original point -- the security comes from combining several words from a large wordlist, not from capitalization or special characters. You can still turn on a trailing number if a site requires one, but it's optional here rather than forced.
Is 4 words from this wordlist actually strong?
Yes -- each word from the EFF short wordlist contributes about 10.3 bits of entropy, so 4 words give roughly 41 bits, comparable to an 8-character fully-random password using upper/lower/numbers/symbols, but noticeably easier to memorize and type accurately.
Should I add more words for extra security?
Yes, if you want a stronger result -- each additional word adds about 10.3 more bits of entropy. Use the slider to try 5 or 6 words for passphrases protecting especially sensitive accounts, like a password manager's master password.
Is the generated passphrase sent anywhere?
No. Every word is chosen using the Web Crypto API's cryptographically secure random number generator, entirely inside your browser -- nothing is transmitted or stored.

About the author

Vinitha Pu

Founder and designer

Vinitha Pu is a graphic designer based in Palakkad, Kerala, who builds free, privacy-friendly browser tools. She studied Textile and Apparel Design at Avinashilingam University and completed a C-Tech in Graphic Design at Image Creative Education in 2025. She designs, builds and maintains the password generators, strength checkers, hash tools and security calculators on PasswordHive.

  • Content author: Vinitha Pu
  • Fact checked by: Vinitha Pu. Each tool's output is checked against official test vectors or a reference implementation, and every strength and crack-time figure against the formula it uses, before it goes live.
  • Published Updated