Diceware Generator
Generate real Diceware passphrases using the EFF Short Wordlist.
How Diceware works
Diceware uses a wordlist of 7776 common English words. Each word is selected by rolling dice (or in this case, using cryptographically secure random numbers). The EFF Short Wordlist 2.0 is used for maximum memorability.
Introduction
The original scientifically-backed method for creating memorable, high-entropy passphrases. The Diceware Generator simulates rolling physical dice to select random words from the EFF's 7,776-word Diceware list — the same method recommended by security researchers including Bruce Schneier and endorsed by the Electronic Frontier Foundation. Each dice roll maps to a five-digit number (11111 to 66666), which selects exactly one word from the list. Seven words give you 90.4 bits of entropy — computationally infeasible to crack even with massive GPU clusters. This is the tool that brings the rigor of physical dice to your browser, without the hassle of finding six dice.
What This Tool Does
Why It Matters
Diceware was designed to solve a specific problem: creating passphrases that are both memorable and mathematically secure. Unlike random character passwords that are hard to remember, and unlike human-chosen phrases that are weak, Diceware produces word combinations that are both. The method's strength comes from its transparency — the wordlist is public, the entropy calculation is verifiable, and the randomness source is the only variable. By using crypto.getRandomValues() instead of physical dice, this tool provides the same mathematical guarantees as the original method while eliminating the possibility of biased dice rolls, poor dice technique, or transcription errors.
How It Works
Step-by-Step Examples
The tool simulates rolling 5 dice (via crypto.getRandomValues) to generate a number between 11111 and 66666
Each 5-digit number maps to one word in the EFF Diceware list (7,776 words total)
This process repeats 6 times to select 6 random words
Total entropy: 6 × log₂(7776) ≈ 6 × 12.92 ≈ 77.5 bits
walnut clarinet tumble prism orbit cobalt — 77.5 bits of entropy, requiring 2.2 × 10²³ combinations to brute-forceSimulate 4 dice rolls to select 4 words
Total entropy: 4 × 12.92 ≈ 51.7 bits
This is sufficient for general accounts but not for high-value credentials
Add a 5th word for master password security
plumber rocket jungle mosaic — 51.7 bits, adequate for email but insufficient for password vaultsCode Examples
// EFF Diceware wordlist: 7,776 words
// Each word is selected by a 5-digit dice roll (11111-66666)
import { EFF_WORDLIST } from './diceware-wordlist.js';
function rollDice5() {
// Simulate rolling 5 six-sided dice
// Each die: 1-6, combined as a 5-digit number: 11111 to 66666
const dice = new Uint8Array(5);
crypto.getRandomValues(dice);
return Array.from(dice)
.map(d => (d % 6) + 1) // Map 0-255 to 1-6
.join('');
}
function generateDicewarePassphrase(wordCount = 6) {
const words = [];
for (let i = 0; i < wordCount; i++) {
const roll = rollDice5();
const index = parseInt(roll, 10) - 11111; // Convert to 0-based index
words.push(EFF_WORDLIST[index]);
}
const entropy = wordCount * Math.log2(EFF_WORDLIST.length);
return {
passphrase: words.join(' '),
wordCount,
entropyBits: entropy.toFixed(1),
combinations: Math.pow(EFF_WORDLIST.length, wordCount).toExponential(2)
};
}
// Usage
const result = generateDicewarePassphrase(6);
console.log(result.passphrase); // "walnut clarinet tumble prism orbit cobalt"
console.log(result.entropyBits); // "77.5"// For users who prefer physical dice
function diceRollToWord(rolls) {
// rolls: array of 5 numbers (1-6 each), e.g., [3, 1, 4, 1, 5]
const rollString = rolls.join('');
const index = parseInt(rollString, 10) - 11111;
if (index < 0 || index >= 7776) {
throw new Error('Invalid dice roll: must be 5 dice, each 1-6');
}
return EFF_WORDLIST[index];
}
// Example: user rolls 3,1,4,1,5 on physical dice
const word = diceRollToWord([3, 1, 4, 1, 5]);
console.log(word); // The word at position 1354 in the EFF list
// Entropy per word: log₂(7776) ≈ 12.92 bits
// 6 words = 77.5 bits totalDiceware Passphrase Entropy by Word Count
| Words | Entropy (bits) | Combinations | Brute-Force Time (1T h/s) | Security Level |
|---|---|---|---|---|
| 3 | 38.8 | 4.7 × 10¹¹ | 0.0075 seconds | Weak — do not use |
| 4 | 51.7 | 3.7 × 10¹⁵ | 58.6 years | Moderate — low-risk accounts |
| 5 | 64.6 | 2.8 × 10¹⁹ | 902,000 years | Strong — general accounts |
| 6 | 77.5 | 2.2 × 10²³ | 7.0 × 10⁹ years | Very Strong — sensitive data |
| 7 | 90.4 | 1.7 × 10²⁷ | 5.4 × 10¹³ years | Extremely Strong — master passwords |
| 8 | 103.4 | 1.3 × 10³¹ | 4.1 × 10¹⁷ years | Maximum Practical |
Diceware vs Other Passphrase Methods
| Method | Word Source | Entropy/Word | 5-Word Total | Auditable? |
|---|---|---|---|---|
| EFF Diceware | 7,776 curated English words | 12.92 bits | 64.6 bits | Yes — public wordlist |
| Original Diceware (1995) | 2,048 short English words | 11.0 bits | 55.0 bits | Yes — public wordlist |
| PGP Word List | 256 words (byte values) | 8.0 bits | 40.0 bits | Yes — but low entropy |
| Random word generators | Varies (often small) | Varies | Unpredictable | No — opaque wordlists |
Benefits
- Uses the EFF Diceware wordlist — the gold standard for passphrase generation, audited and endorsed by security researchers.
- Simulates physical dice rolls with cryptographic randomness, providing the same mathematical guarantees as the original method.
- Fully transparent: the wordlist is public, the entropy calculation is verifiable, and the method is well-documented.
- Supports 3-8 words with real-time entropy calculation showing exact bit strength for your chosen word count.
Use Cases
Generating master passwords for password manager vaults that protect all other credentials.
Creating high-security passphrases for SSH key encryption and GPG key passphrases.
Building shared team passphrases for encrypted communication tools during onboarding.
Producing recovery passphrases for cryptocurrency wallet backup seed phrases.
Common Mistakes to Avoid
Using fewer than 5 words — 3 words provides only 38.8 bits of entropy, crackable in under a second at 1 trillion hashes/second.
Adding personal meaning to word selection — the entire security model depends on true randomness, not human intuition.
Reusing the same Diceware passphrase across multiple services — generate a unique one for each account.
Writing down the passphrase without encrypting it — a written Diceware passphrase is only as secure as the physical location it's stored in.
Security Implications
The Diceware method's security rests on two pillars: the size of the wordlist (7,776 words) and the quality of randomness used for selection. With crypto.getRandomValues(), each word has exactly equal probability of selection, providing log₂(7776) ≈ 12.92 bits of entropy per word. A 6-word Diceware passphrase has 77.5 bits of entropy — the same as a 12-character random password with full ASCII character pool. The method is resistant to dictionary attacks because attackers must test 7776⁶ ≈ 2.2 × 10²³ combinations, which would take billions of years even with massive GPU clusters.
Security Information
Frequently Asked Questions
References & Further Reading
What is a Diceware Generator?
A Diceware generator is a passphrase creation method that uses dice rolls to select words from a curated wordlist. Originally developed by Arnold Reinhold in 1995, Diceware produces passphrases that are both highly secure and human-memorable. Each word in the passphrase is selected by rolling five six-sided dice, producing a five-digit number that maps to a specific word in the Diceware wordlist.
Our implementation uses the EFF Short Wordlist 2.0, which contains 7,776 carefully selected English words. These words were chosen for being common, easy to spell, and distinct from one another to minimize confusion. The result is a passphrase that provides strong cryptographic security while remaining easy to type and remember.
How Diceware Generates Entropy
The security of a Diceware passphrase comes from its entropy. With 7,776 words in the EFF wordlist, each word adds approximately 12.92 bits of entropy (log2 of 7,776). A typical 6-word Diceware passphrase provides about 77.5 bits of entropy, which is considered cryptographically strong.
When you roll five dice, there are 6^5 = 7,776 possible outcomes, each mapping to a unique word. Our tool uses the Web Crypto API to generate cryptographically secure random numbers, replacing physical dice with a source of true randomness. This ensures that each word selection is unpredictable and unbiased.
The "Build Your Own" mode allows you to customize a Diceware passphrase with additional transformations. You can substitute characters (like replacing "a" with "@"), add random suffixes, mix capitalization, or insert separators. These modifications add extra entropy while maintaining readability.
Where to Use Diceware Passphrases
Master Passwords: Diceware excels as a master password for password managers. You need one extremely strong password that protects all your other credentials, and a 6-8 word Diceware passphrase provides that security while remaining memorable.
Disk Encryption: Full-disk encryption tools like BitLocker, FileVault, and LUKS require strong passphrases. A Diceware passphrase protects your entire hard drive against physical theft and offline attacks.
SSH Keys and GPG: When protecting private keys with a passphrase, Diceware provides the ideal balance of security and usability. You can type the passphrase from memory without exposing it to keyloggers.
Wi-Fi Network Keys: For home or office networks that use WPA2/WPA3 personal mode, a Diceware passphrase can serve as a strong network password that guests can easily type without errors.
Common Diceware Mistakes
Using Too Few Words: A 4-word Diceware passphrase provides only about 51.7 bits of entropy, which may be insufficient for high-security applications. Aim for at least 6 words for most use cases, and 8 or more for protecting encryption keys.
Choosing Words Manually: The security of Diceware depends entirely on randomness. If you select words yourself, your choices are predictable and can be guessed much more easily. Always let the generator pick the words randomly.
Not Using Separators: Words without separators (like "correcthorsebatterystaple") can be harder to read and type correctly. Using dots, hyphens, or spaces between words improves usability and reduces typing errors.
Reusing Across Services: Even with a strong Diceware passphrase, reusing it across multiple services creates vulnerability. Use your Diceware passphrase as a master password and generate unique passwords for individual accounts.
Related Tools
Explore these additional passphrase and password generation tools:
- Passphrase Generator — Generate multi-word passphrases using different word selection methods.
- XKCD Generator — Create XKCD-style passphrases inspired by the famous comic strip.
- Password Entropy Calculator — Calculate the entropy bits of your Diceware passphrase.
- Password Strength Checker — Test your passphrase strength against dictionary attacks.
- Memorable Password Generator — Create memorable passwords with word-number combinations.