A Diceware passphrase generator, implemented in JavaScript, that uses the Cryptographically Secure Pseudo Random Number Generator (CSPRNG) in your browser as its source of entropy instead of rolling physical dice.
- Zero runtime dependencies — all vanilla JavaScript ES modules
- All random number generation uses the browser's
crypto.getRandomValues() - Single page application with no communication back to a server
- Can be run locally from a Git clone — no install or build step required
- Can be run without a network connection — no logging or analytics
- Automatic dark/light mode support
- Realtime estimate of the security level of your generated passphrase
- Crack time estimates for consumer, professional, and nation-state attackers
- Support for many language-specific word lists
It may just be the closest thing to rolling your own dice. You can do that too of course, and just use this app as a quick way to look up your passphrase in the word lists.
Just choose a language and click a button corresponding to the number of words you want to generate. You'll get a new passphrase with each click. Each generation rolls a set of five virtual dice for each word. Words are chosen from the included Diceware word lists. The die roll numbers are shown next to each word.
This project uses mise to manage development tool dependencies (Node.js, Caddy, Task). Install mise, then from the project root:
mise installThis installs all required tools as defined in .tool-versions.
Development tasks are defined in Taskfile.yml and run via
Task. To see all available tasks:
taskKey tasks:
task serve— start local dev server on http://localhost:8080task lint— check linting and formattingtask lint-fix— auto-fix lint and format issuestask format— format all filestask precommit— run all precommit checks
If you are security conscious you are encouraged to download the
source code for this app and run it
locally. You'll need to serve the application from a local HTTP server
(ES modules require this — file:// URLs won't work).
cd diceware
mise install
task serveThen open http://localhost:8080 in your browser.
Alternatively, use any static file server:
python3 -m http.server 8080Pull the pre-built image from GitHub Container Registry and run it:
docker run --rm -p 8080:8080 ghcr.io/grempe/diceware:latestThen open http://localhost:8080 in your browser.
Or use Docker Compose to pull and run the pre-built image:
docker compose upTo build the image locally from source instead:
docker compose up --buildIf you want to be really, really secure, roll the dice with a flashlight under a black hood with a printout of the Diceware word list. No computers needed!
Bug reports and pull requests are welcome on GitHub at https://github.com/grempe/diceware. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Copyright (c) 2016-2026 Glenn Rempe (glenn@rempe.us)
Available as open source under the terms of the MIT License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the LICENSE file for the specific language governing permissions and limitations under the License.
This implementation was inspired by the very nicely done https://github.com/yesiamben/diceware. I took the opportunity to upgrade some security aspects and the UI.