Diceware passphrase generator

Generate a passphrase of random words from the EFF word lists (7776 words, the same as rolling five dice), with the secure random generator of your

loading Diceware passphrase generator
About this tool

What is a Diceware passphrase?

Diceware is a method for making a passphrase from random words. You roll five dice, read the five digits as a number from 11111 to 66666, and look that number up in a list of 7776 words. Repeat for each word. The result is something like abacus-zoom-..., easy to remember and type, and with a strength you can calculate. Each word from a list of 7776 adds about 12.9 bits of randomness, so six words give about 77.5 bits.

This page does the lookup for you. It picks words with the secure random generator of your browser, using only uniform random numbers (values that would favour some words are thrown away). Nothing is sent or stored. You choose the list, the number of words, the separator, capital letters and an optional digit, and the page shows the entropy and a rough guess time.

The word lists are the three published by the Electronic Frontier Foundation (EFF). The large list has 7776 words and is the classic five-dice list. Short list 1 has 1296 words (four dice), with shorter words and 10.3 bits each. Short list 2 has 1296 words that are unique after their first three letters, which helps if you type with autocomplete or want to abbreviate.

Use a passphrase where you must remember the secret yourself: a password manager master password, a disk encryption password, a key file passphrase, a Wi-Fi password. For a login stored in a password manager, a random password is just as good and shorter. The key idea is that the words are chosen by chance, not by you. A phrase you invent, such as a quote or a line of a song, is far weaker than the same number of random words.

Credit: the word lists are by the Electronic Frontier Foundation, licensed CC BY 3.0 US. Source: eff.org/dice

How to make a passphrase

  1. Choose the Word list:. The EFF large list is the default and gives the most entropy per word.
  2. Set Words:. Six is a good start for something important. The tool accepts 2 to 30.
  3. Pick a Separator: (hyphen, space, dot, underscore, comma or none). It does not add randomness, but it helps reading and typing.
  4. Tick Capitalize words if a site demands an uppercase letter, and Add a digit if it demands a number. The digit is added to a random word and adds a little entropy.
  5. Click Generate again until you get one you like, then use Copy passphrase. Choosing among results is fine, but do not edit words by hand.
  6. Read the Entropy line and the strength note under it.
  7. To use real dice, open Roll your own dice, type the rolls in Dice rolls: and see the word.

Examples

Looking up a word with dice

With the large list, five rolls make one word. The lookup follows the official EFF file:

Dice rollsWord
11111abacus
11112abdomen
66666zoom

So rolling 1, 1, 1, 1, 1 gives abacus, and rolling five sixes gives zoom. The short lists use four dice instead of five.

How many words are enough

Entropy is words times the bits per word, with the large list:

WordsEntropy
4about 51.7 bits
5about 64.6 bits
6about 77.5 bits
7about 90.5 bits

Six words is a common choice for a password manager master password. Adding a digit to a six-word phrase adds log2(60), about 5.9 bits.

Large list against a short list

Six words from the large list give about 77.5 bits. Six words from short list 1 give 6 times 10.3, about 62 bits. The short list gives shorter words, but you need more of them for the same strength.

Common mistakes

  • "Ask for 2 to 30 words." The word count is outside the range. Pick a number inside it.
  • "Dice rolls are the digits 1 to 6." A roll has a digit outside 1 to 6. Check for a 0, 7 or a letter.
  • "This list uses 5 dice rolls for each word." The large list needs five digits per word; the short lists need four. Spaces, commas and hyphens between digits are fine.
  • Changing words you do not like. Replacing a word with one you prefer removes the randomness. Generate again instead.
  • Adding a pattern to look stronger. Substituting letters for symbols or adding "!" at the end adds almost nothing, because attackers try those first. Add a word.
  • Reusing the phrase. One strong passphrase on ten sites is as weak as the weakest site.

Frequently asked questions

Is a passphrase of random words really secure?

Yes, when the words are random and the length is enough. The security comes from the size of the list and the number of words, not from secrecy of the method. An attacker who knows you used Diceware and this list still has to try about 2 to the power of 77.5 combinations for six words.

Is it safe to generate it in a web page?

The page uses the secure random generator of your browser and sends nothing, so the phrase never leaves your device. For the highest assurance, roll real dice and use the lookup. You can also check any phrase with the password strength analyser.

How many words do I need?

Five words is acceptable for most accounts, six is good for important secrets and seven or more for long-term protection of encrypted data. If an attacker can only try a few guesses per second online, fewer words may be enough; if they can copy a file and try trillions per second offline, use more.

What if I need a PIN or an ID instead?

Use the PIN generator for numeric codes, or the token generator for random strings.

Make a Diceware passphrase in code

JavaScript

// words: the 7776-word EFF list, as an array
function pick(max) {
  const limit = 2 ** 32 - (2 ** 32 % max);
  for (;;) {
    const [v] = crypto.getRandomValues(new Uint32Array(1));
    if (v < limit) return v % max;
  }
}
const phrase = Array.from({ length: 6 }, () => words[pick(words.length)]).join('-');

Python

import secrets

# words: the 7776-word EFF list, as a list
phrase = "-".join(secrets.choice(words) for _ in range(6))
Report a problem