Most of your passwords should be long random strings stored in a password manager, and you never need to remember them. But a handful of secrets have to live in your head: the master password for that password manager, your computer's login, full-disk encryption, perhaps the passphrase on an SSH key. For those, Tq8#vL2!pZ is miserable to type and easy to forget, and a favourite quote is easy to guess.
A passphrase made of several randomly chosen words solves both problems. This guide explains why it works, how to measure its strength honestly, how many words to use for each purpose, and which "improvements" actually weaken it.
Why random words work
The idea behind the Diceware method is simple: take a published list of words, pick several of them completely at random, and join them. For example:
velvet-orbit-plenty-crane-mosaic-fabric
The security does not come from the words being obscure; the attacker is assumed to know the exact word list. It comes from the number of possible combinations. If the list has N words and you pick k of them at random, there are N^k possible passphrases, and the strength in bits is:
entropy (bits) = k × log2(N)
With a 2,048-word list, each word adds exactly 11 bits. With the well-known 7,776-word Diceware-style lists (designed for five dice rolls per word), each word adds about 12.9 bits.
The crucial word: random
This maths only holds if you do not choose the words. People who pick "random" words gravitate toward the same nouns, form phrases that make grammatical sense, or reuse song lyrics. Attackers model all of that. A passphrase is only as strong as the randomness that produced it, so let dice or a cryptographically secure generator do the picking.
How many words do you need?
The table assumes a 2,048-word list (11 bits per word) and a fast offline attack of ten billion guesses per second, which is roughly what an attacker with good hardware might achieve against a fast, unsalted hash. The time is the average to find the passphrase.
| Words | Entropy | Average time at 10 billion guesses/s |
|---|---|---|
| 4 | 44 bits | about 15 minutes |
| 5 | 55 bits | about 3 weeks |
| 6 | 66 bits | over a century |
| 7 | 77 bits | hundreds of thousands of years |
Two things change the picture in your favour. Online logins are rate-limited, so even four words resists guessing through a login form. And systems that store passwords with a slow algorithm such as bcrypt or Argon2 cut the guessing rate by many orders of magnitude. But you cannot always know how a service stores your password, so plan for the fast case:
- Online accounts (if you are not using a password manager): 5 words.
- Password manager master password, device login: 6 words.
- Disk encryption, encrypted backups, anything an attacker can attack offline forever: 7 words.
For the broader question of length and character sets, see How Long Should a Password Be?.
Generate a passphrase with our tool
The Passphrase Generator picks words with crypto.getRandomValues using unbiased selection from a word list bundled in the page, so nothing is fetched or sent.
- Move the Number of words slider (3 to 12). Start at six for anything important.
- Choose a Separator: hyphen, space, period, underscore, comma, none, or Custom… for your own.
- Pick a Capitalisation style: lowercase, Capitalise Each, UPPERCASE or rANDOM per word.
- Tick Add a number or Add a symbol only if a site's rules demand them.
- Five options appear. Choose the one you find easiest to picture, copy it with its icon, or click Generate new passphrases for another set.
- Check the tiles: Entropy, Word list size (with bits per word), Strength and Offline attack time.
Choosing one of five options costs you a little over 2 bits, because an attacker could in theory favour the kind of phrase people pick. With six or more words that is negligible, and the memorability gain is worth it.
Other ways to make one
Physical dice
The original method: roll five dice per word, read the digits as a number such as 43516, and look it up in a printed Diceware list. It is slow but fully offline and easy to audit, which some people prefer for a master password.
Your password manager
Most password managers include a passphrase or "memorable password" option in their generator. That is a good choice, since the result goes straight into the vault.
A few lines of code
If you want to script it, use a cryptographically secure random function. In Node.js, crypto.randomInt returns unbiased integers:
const crypto = require("node:crypto");
const fs = require("node:fs");
// words.txt: one word per line, e.g. a published Diceware-style list
const words = fs.readFileSync("words.txt", "utf8").split(/\r?\n/).filter(Boolean);
const count = 6;
const picked = Array.from({ length: count }, () => words[crypto.randomInt(words.length)]);
console.log(picked.join("-"));
console.log(`${(count * Math.log2(words.length)).toFixed(1)} bits of entropy`);
Never use Math.random() for this; it is not designed to be unpredictable. The same applies to any language: use its secure random module.
Pitfalls that weaken a passphrase
Swapping in symbols and digits
Turning harbor into h@rb0r adds very little, because cracking tools try those substitutions automatically. If you need more strength, add a word: one extra word from a 2,048-word list adds 11 bits, more than a digit and a symbol together.
Rerolling until it "sounds right"
Rejecting dozens of results until you get a phrase that tells a story shrinks the real search space. Pick from a small set and stick with your choice.
Reusing it
A strong passphrase used on two sites is only as safe as the weaker site's storage. Keep memorised passphrases for the few places that need them and let a Password Generator and password manager handle everything else.
Trusting a strength meter over the maths
Pattern-based meters, like our Password Strength Checker, are useful for spotting weak human-chosen passwords. For a randomly generated passphrase, the entropy calculation is the more honest measure, because the meter cannot know the words were chosen randomly.
Remembering it
Picture a scene that links the words in order, type it a few times a day for the first week, and write it down on paper kept somewhere physically secure until it sticks. Then destroy the note. For a password manager master password, consider keeping a sealed copy with important documents so that someone you trust can recover it.
If you need random secrets for machines rather than people, such as API keys or signing keys, a passphrase is the wrong tool; use the Secret Key Generator instead.
Frequently asked questions
Is a passphrase better than a random password?
Not inherently. Strength depends on entropy. A six-word passphrase and a random 10 to 11-character password with mixed characters are roughly comparable, but the passphrase is much easier to type and remember.
Can I use spaces as the separator?
Yes, most modern systems accept spaces. Some older sites strip or reject them, so a hyphen or period is a safe alternative.
Does it matter if the attacker knows my word list?
No. The entropy figure already assumes they know the list and your settings. The strength comes from the random choice, not from secrecy of the list.
Should I capitalise words or add numbers?
Only to satisfy a site's rules. Each option adds at most a few bits, while an extra word adds around 11 to 13.
How often should I change a passphrase?
Change it if you suspect it was exposed or reused. Routine forced changes tend to produce weaker, predictable variations, which is why current guidance generally favours changing on evidence of compromise.