Back to Developer
Dice roller — 2d6+3 / 4d6kh3 notation (Web Crypto, no server)

Dice roller — 2d6+3 / 4d6kh3 notation (Web Crypto, no server)

Roll TTRPG / board-game dice using familiar notation: 2d6+3, 1d20-2, 4d6kh3 (keep highest 3), 3d6+1d4-1, and more. Randomness uses the Web Crypto API (crypto.getRandomValues with rejection sampling) for an exactly uniform distribution. Comes with one-click presets (d4 / d6 / d8 / d10 / d12 / d20 / d100 / 3d6 / 4d6kh3, …) and an in-browser history of the last 20 rolls. Nothing is uploaded.

developergenerate

How to use

1. Type a dice expression directly, or click a preset (d6 / 3d6 / 4d6kh3, …) to insert it. 2. Press "Roll" to see the result — individual rolls plus the total. 3. To re-roll the same expression, use "Roll again". 4. Up to 20 most recent rolls are kept below as a battle log. Supported notation: - `NdM` — N dice of M sides (e.g. 2d6) - `+const` / `-const` — modifiers (e.g. 2d6+3, 1d20-2) - `khN` / `klN` — keep highest / lowest N (e.g. 4d6kh3 for D&D ability scores) - `dhN` / `dlN` — drop highest / lowest N - Combined — chain multiple terms like 3d6+1d4-1

FAQ

Is my input uploaded?
No. Everything runs in your browser. Even the random numbers are generated locally via the Web Crypto API.
How fair is the randomness?
We pull 32-bit integers from crypto.getRandomValues and apply rejection sampling for dice whose face count is not a power of two (e.g. d100). The resulting distribution is provably uniform — strictly fairer than Math.random(), and especially noticeable on dice with few faces.
What does 4d6kh3 mean?
Roll four d6 and keep the highest 3. This is the standard D&D ability-score generation method. 'kh' = Keep Highest. Variants: kl (keep lowest), dh (drop highest), dl (drop lowest).
What about 2d20kh1 / 2d20kl1?
Those are D&D 5e's 'advantage' / 'disadvantage' checks. Roll two d20 and keep the higher (kh1) or lower (kl1).
What are the upper limits?
Each term allows 1–1000 dice with 2–1,000,000 sides. Plenty for everyday games.
Does the history persist?
No. It lives only in memory for the current tab and clears when you navigate away or close the page. Persistence may come later.

Related tools