rollatom playground
A dice-notation parser and roller for JavaScript. Type a formula: this page says what it means, rolls it, and shows the object your code would get back.
Try
more
What it means
explainDice()Recent rolls
Use it in your code
Install
npm install rollatom- One file, no dependencies.
- TypeScript types included.
- ES module. Runs in Node 20+, browsers, web workers and Deno.
- Rolls with
crypto.getRandomValues, or a generator you pass in. - MIT license.
Enter a valid formula to see it in code.
Notation by example
Click a formula to load it and roll it. The grammar is the full reference.
Nothing matches. Try “keep”, “Fate” or “success”.
Colors and names
Click a color to insert it at the cursor. It goes right after the die, as in 2d6{#red}. Add a name, 2d6{#red,'fire'}, and those dice get their own subtotal.
Coming from Roll20 or Foundry
Most notation carries over unchanged. These are the spellings that differ; click one to try it.