Dice roller (d4 to d100)
Roll tabletop dice with NdS notation: 3d6+2, 4d6-2, d100. Cryptographic randomness, no bias, with roll history.
Every roll uses crypto.getRandomValues with rejection sampling: the distribution is exactly uniform, no modulo bias. Nothing is stored or sent to any server.
Built by
Miguel Ángel Colorado Marin (MACM)
Built by
Miguel Ángel Colorado Marin (MACM)
Full-Stack Developer · Guadalajara, España
I develop web apps, digital tools and full projects — from design to deployment.
The usual virtual dice hides a flaw: Math.random() and modulo bias subtly skew results when the range is not a power of two. This roller uses crypto.getRandomValues with rejection sampling — the technique that guarantees an exactly uniform distribution: on a d20, every face has an identical 5% chance, roll after roll. It accepts standard RPG notation — d20 for attacks, 3d6+2 for damage with modifiers, 4d6-2 for stat generation, d100 for tables — up to 200 dice per roll, with each individual die shown plus the modifier-adjusted total. Useful for D&D and Pathfinder sessions without physical dice, board games, and any random decision where bias matters.
Features
- ✓Full NdS notation with modifier: d20, 3d6+2, 4d6-2, d100
- ✓Virtual dice up to 1000 sides and 200 dice per roll
- ✓Cryptographic randomness with rejection sampling: exactly uniform distribution
- ✓Per-die breakdown plus modifier-adjusted total
- ✓History of the last 10 rolls
How do I roll dice online?
- 1
Type the notation
NdS with modifier: d20, 2d6+1, 4d6-2, d100.
- 2
Roll with Enter or the button
Rolling is instant and local: no server latency.
- 3
Read the breakdown
Each individual die plus the total with the modifier applied.
- 4
Check the history
The last 10 rolls with their full breakdown.
Frequently asked questions
What does 3d6+2 mean?
Roll three six-sided dice and add 2. It's the universal RPG notation NdS±M: N dice with S sides each plus a fixed modifier.
Is it truly random or Math.random()?
It uses crypto.getRandomValues with rejection sampling, the browser's cryptographic generator. Math.random() carries no uniformity guarantee and naive modulo introduces bias — both solved here.
How many dice can I roll at once?
Up to 200 dice of up to 1000 sides per roll. Beyond that you don't need dice, you need statistics.
Related tools
Embed Dice Roller on your site
Add Dice Roller to any web page with a simple iframe. Free, with attribution to miguelacm.es.
<iframe
src="https://miguelacm.es/embed/dice-roller"
width="100%"
height="700"
frameborder="0"
title="Dice Roller — miguelacm.es"
></iframe>View embed in new tab →