Dice Roller
A free online dice roller: d4 to d100, dice notation like 2d6+3 and 4d6 drop lowest, advantage, presets, exact odds and a fair draw anyone can verify.
Rolling 2d6.
Computed exactly from every combination of the dice.
Shows a fingerprint of the settings before the draw and the secret seed after it, so anyone can re-run it and check the result.
Verify someone else's draw
Paste what was published: the settings exactly as shown, the revealed seed and the commitment hash. The panel recomputes both.
Fair draw shows the result follows from the seed and settings. It does not stop someone from privately trying several seeds before publishing one, so for something that matters, publish the commitment first where others can see its time. How we test randomness
- Verified: fair odds and exact landing tested on every release
- Last reviewed:
- Runs in your browser: nothing is uploaded
- Found an error?
How to roll dice online
- Step 1
Pick your dice
Tap d4, d6, d8, d10, d12, d20 or d100 to add a die, or type notation such as 2d6+3, 4d6 drop lowest or d20 advantage.
- Step 2
Roll
Press Roll or Space. Each die is drawn from your browser's secure random number generator, then tumbles into place. The total is the sum of the dice that count.
- Step 3
Check the odds
The chart under the dice shows the exact probability of every total for the dice you chose, with your roll marked.
Dice notation explained
Dice notation writes a roll as NdS: N dice with S sides each. Anything it cannot read is refused with a reason rather than guessed.
- d6
- One six-sided die.
- 2d6
- Two six-sided dice, added together.
- 2d6+3
- Two six-sided dice plus 3.
- 1d8+1d4-2
- Mixed dice with a modifier. Add as many terms as you like.
- 4d6 drop lowest
- Roll four d6 and ignore the lowest (also 4d6dl1 or 4d6kh3). The classic way to roll a character stat.
- d20 advantage
- Roll two d20 and keep the higher (also 2d20kh1). Disadvantage keeps the lower (2d20kl1).
- d%
- A percentile die: the same as d100.
How the randomness works
Each die is rolled by your browser's cryptographic random number generator, and the dice are then animated into place. The total is added up from the faces that came up, so the animation can never influence it.
Formulas
Random numbers come from crypto.getRandomValues, the browser's cryptographically secure generator. Math.random is never used, and a test fails if it appears anywhere in the random code.
To pick one of n equally likely outcomes the page reads a 32-bit number and throws away values from the last, partial run of the range (rejection sampling), so rounding never makes some outcomes likelier than others.
accept x if x < 2³² − (2³² mod n), then pick x mod n
A die with s sides is one unbiased integer from 1 to s. Every die in a roll is drawn independently, and the notation NdS means N such dice added together.
total = (sum of the dice that count) + modifier
Keep-highest, keep-lowest, drop-lowest, drop-highest and advantage rolls all the dice, then rank them by value (earlier dice first on a tie) and count only those kept. Dropped dice are shown crossed out and do not add to the total.
The chart of totals is computed exactly, not by simulation: the probability of each total is found by combining the dice one at a time, or, for keep and drop rolls, by listing every combination of faces.
P(total t on 2d6) = (number of ways to make t) ÷ 36
Fair draw: before the draw the page shows a commitment, the SHA-256 hash of the canonical JSON of the settings and a secret random seed. The result comes only from that seed, through a stream built from HMAC-SHA-256 in counter mode, read with the same unbiased sampling.
commitment = SHA-256(JSON of settings and seed); block k = HMAC-SHA-256(seed, label ‖ k)
After the draw the seed is revealed. The verify panel recomputes the hash (so the settings were fixed in advance) and the result (so it follows from them). A changed setting, seed or hash is reported as a mismatch.
Sources
- MDN Web Docs, Crypto.getRandomValues(). The browser's cryptographically secure random number API behind every draw.
- NIST FIPS 180-4, Secure Hash Standard. Defines SHA-256, which makes the fair-draw commitment.
- IETF RFC 2104, HMAC. Defines the keyed hash used to generate the fair-draw random stream.
How we test this
This tool is tested for fair odds, exact landing and reproducible draws every time the site is released, and a release does not ship if a check fails. Example from the test suite: 4d6 drop lowest, three times, fair draw, seed 0b7e9c41…c4a5 gives 6,5,(1),3 = 14; 5,(2),4,6 = 15; 4,5,(2),4 = 13. A number in brackets is a dropped die. The test checks the sums against the dice that count, and a separate test rebuilds the random stream with Node's crypto library to confirm the faces. Others run 100,000 rolls of each die type through a chi-square check and compare the exact odds with brute force.
The test is “fair draw: the published examples reproduce” in tests/random.test.mjs. More on how all tools are tested: our testing approach.
Assumptions and limits
- The randomness is only as good as your browser's generator. No web page can prove a device has not been tampered with.
- Fair draw shows that the settings were fixed before the draw and that the result follows from them. It does not stop someone from privately trying several seeds before publishing a hash, so for anything that matters publish the commitment early, where others can see its time.
- Everything runs in your browser. The history lives on the page until you clear it. A shared-result link carries only the result, and anyone can edit a link, so it is not proof; Fair draw is.
- A roll holds up to 100 dice per term and 200 in all, with 2 to 1,000 sides, and can be repeated up to 20 times. Notation is checked strictly: anything it cannot read is refused rather than guessed.
Last reviewed , the date of the latest change to this tool's calculation or content.
Embed this on your site
Free to use on blogs, classroom pages and docs. Paste this where you want the dice roller to appear; it includes a text link back to this page. See every widget on the embed page.
<iframe src="https://www.clevr.tools/embed/dice-roller" width="100%" height="620" style="border:0" loading="lazy" title="Dice roller"></iframe>
<p><a href="https://www.clevr.tools/dice-roller">Dice roller</a> by clevr.tools</p>Helpful answers
Frequently asked questions
- How does the dice roller work?
- Each die is an independent, unbiased random integer from 1 to its number of sides, drawn from your browser's cryptographic generator. The dice then tumble into place, but the animation only shows a result that is already decided.
- What is dice notation?
- A short way to write a roll: 2d6+3 means roll two six-sided dice and add 3. NdS is N dice with S sides, +K adds a modifier, and extras such as drop lowest, keep highest or advantage choose which dice count.
- How do I roll D&D ability scores?
- Use the D&D stats preset: it rolls 4d6 and drops the lowest die, six times, one result per ability score. You can also type 4d6 drop lowest and set the repeat count to 6.
- What are the odds of each total on 2d6?
- There are 36 equally likely combinations. A total of 7 can happen six ways, so it has a 6 in 36 (16.7%) chance and is the most likely total. 2 and 12 each have 1 in 36 (2.8%). The chart on this page shows every total, computed exactly.
- Can I roll dice for Monopoly or Yahtzee?
- Yes. The Monopoly preset rolls 2d6 and flags doubles, and the Yahtzee preset rolls 5d6.
- Is the dice roller fair?
- Yes. The tests draw 100,000 rolls of every die type, d4 through d100, and check them against equal probabilities with a chi-square test. Turn on Fair draw if you want others to be able to verify a roll.
- Is anything sent to a server?
- No. Rolling happens in your browser. The history stays on the page until you clear it.
Related Tools
Coin Flip
newA free coin flipper: heads or tails with a 3D coin, 1 to 100 coins at once, streaks, your own words on each side and a fair draw anyone can verify.
Random Number Generator
Pick random numbers in any range: whole numbers or decimals, no repeats, exclusions, lottery-style presets and a fair draw anyone can verify.
Spin the Wheel
newA fair, free wheel spinner and random name picker. Weighted odds, verifiable draws, saved wheels, and nothing uploaded unless you share.