4/28/2015 (updated 5/4/2015, and again 12/3/2016):

This PHP script generates a random seven-word passphrase.

More info:
* Passphrases that you can memorize - but that even the NSA can't guess
* The Diceware Passphrase Home Page

We admit up front that since this is an internet-based browser implementation of a Diceware Passphrase generator, it is not really secure - especially if an entity is monitoring your internet activity at the time you use this page to generate passphrases.

The safest and most secure way to generate a diceware passphrase is to print out the Diceware Word List, get a six-sided die, and manually generate a passphrase in a secured location.

Alternatively, you can:
* Install a PHP interpreter on your computer (Windows or Mac OS),
* Disconnect the computer from the internet, and
* Use this Diceware PHP script with the URL parameter '?local=1' to generate Diceware passphrases locally.

If you're not concerned about the security of using this script via the open internet, feel free to use it as is (no warranties are expressed or implied).

For this internet-based implementation, the site random.org is used for generating the random dice rolls.

The local version of this script uses the PHP mt_srand() function for seeding the random number generator (based on the PHP microtime() function), and then rolls the die using mt_rand().

You can invoke the local version of this function via http://doctechnical.com/diceware/index.php?local=1.

To generate a new Diceware passphrase, reload the browser page.

For a shorter passphrase, eliminate words at random from the Diceware passphrase.

For longer passphrases or more variety, generate multiple passphrases with this script and select words at random from all of the passphrases.

Some sites and accounts require a mix of upper/lower case letters, numbers and/or characters - just tweak a Diceware passphrase accordingly, to taste.


Generating a new diceware passphrase (may take a couple of seconds)...

Random Diceware passphrase:
scram trawl hart free glut lyra pig


Click here for the source code of this script