RPG Dice RollerRPG Dice Roller
Home
Guide
API
  • Contributing
  • Code of Conduct
GitHub
Home
Guide
API
  • Contributing
  • Code of Conduct
GitHub
  • Guide

    • Introduction
    • Get Started
    • CLI
    • Usage
    • Customisation
  • Notation

    • What are notations?
    • Dice
    • Modifiers
    • Group Rolls
    • Describing Rolls
    • Maths

Introduction

This library is a JS based dice roller that can roll various types of dice and modifiers, along with mathematical equations.

It's main purpose is for use in pen and paper / tabletop RPGs, like Dungeons & Dragons, Pathfinder, Cyberpunk, Warhammer etc., where players have to roll complicated combinations of dice.

How it works

Dice can be rolled through the use of "notations", which are strings of characters that tell the parser which dice and modifiers to roll.

You can read more about it in the Notation section.

How random is it?

This library uses pseudo random number generation (PRNG) to determine die rolls. It is not true random, but it is suitable for most purposes. PRNGs are used globally for computer-based random number generation.

It is more than sufficient for the vast majority of uses. However, if your needs require, you can modify the RNG engine.

Features

Different dice types

  • Standard dice
  • Percentile dice
  • Fudge / fate dice

Roll modifiers

  • Exploding
  • Compounding
  • Penetrating
  • Keep rolls
  • Drop rolls
  • Re-roll
  • Unique New
  • Target success
  • Target failure
  • Max
  • Min
  • Sort dice

Advanced

  • Group rolls New

Mathematical equations

  • Operators
  • Functions
  • Easy min / max / average total calculations

Customisation

  • Random number generator
  • Exporting / importing rolls

Usage in the wild

Official

  • Vue components - For Tailwind, Bootstrap, basic HTML, and renderless
  • Vuepress plugin - Dice roller plugin used in this documentation
  • CLI New - Command Line Interface for rolling dice

Environment support

This library uses ES6+ and native JS modules, which work in all the latest browsers, and Node.js.

We also provide a bundled UMD version that can be used in environments that don't support ES modules.

We actively support the latest versions of Firefox, Chrome, Opera, Safari, Microsoft Edge, and Node.js.

Node.js

We only support the current Node LTS release and newer. There's no guarantee that it will work on older versions.

Supported node version

Internet Explorer

We do not support IE, and the library will not work in IE (Check out Microsoft Edge instead!).

It may be possible to make it work by creating polyfills for functionality that is missing in IE, but we cannot guarantee it.

Edit this page
Last Updated: 07/02/2026, 21:45
Next
Get Started