Skip to content
Generate passphrases that are secure and still easy to remember.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Change default wordlist to EFF Nov 22, 2019
src Apply fixes from StyleCI Nov 22, 2019
tests Apply fixes from StyleCI Nov 22, 2019
wordlists Initial commit Nov 22, 2019
.gitignore Remove composer.lock Nov 22, 2019
.travis.yml Change clover report path Nov 22, 2019 Add Nov 22, 2019 Add CodeClimate report to .travis.yml Nov 22, 2019
composer.json Fix typo Nov 22, 2019
phpunit.xml Initial commit Nov 22, 2019


Latest Version on Packagist Build Status StyleCI Maintainability Code Coverage

This package makes it easy to generate passphrases that are both secure and easy to remember.

It uses Diceware wordlists and is fully configurable to your needs.


It is very easy to generate a random diceware password, simply use the Facade like this:

$passphrase = Diceware::generate();

// returns 'unwind-cosmic-entryway-magnetic-stardust-ligament'
return $passphrase;

Why use it?

For years, we trained everyone to use passwords that are hard for humans to remember but easy for machines to guess. If you don't want to frustrate your users, you should consider using something like Diceware to generate passphrases that are easier to remember and to typewrite.

Perhaps, the problem is best explained by this famous xkcd comic:

xkcd Password Strength Comic


You can install the package via composer. Next, publish the diceware.php configuration file so can adjust the settings for this package.

composer require martbock/laravel-diceware
php artisan vendor:publish --provider 'Martbock\Diceware\DicewareServiceProvider'


You may change the default settings in the diceware.php config file that will be published to your Laravel config directory once you install this package. Currently, the following options are supported:

'number_of_words'       => 6,
'separator'             => '-',
'capitalize'            => false,
'wordlist'              => 'english',
'custom_wordlist_path'  => null,
'number_of_dice'        => 5,

Of course, you can use your own wordlist, just set the custom_wordlist_path accordingly.


The PHP implementation is licensed under the MIT license, see

The included wordlists have the following licenses:

  • eff.txt is licensed under CC-BY-3.0 by the Electronic Frontier Foundation.
  • english.txt is licensed under CC-BY-3.0 by Arnold G. Reinhold.
  • german.txt is licensed under the GNU General Public License by Benjamin Tenne.
You can’t perform that action at this time.