Roll any die.
Or any dice.

Type 3d6+2 or pick a quick die. d20 with advantage and disadvantage, full notation including 4d6kh3 for stat rolls. Crits highlight automatically.

Bias-free crypto rolls Full dice notation Advantage / disadvantage
Result
Notation cheat sheet
NdS — N dice, S sides
+M / -M — flat modifier
NdSkhK — keep highest K
NdSklK — keep lowest K
2d6+1d4+3 — chain expressions
Examples: 3d6+2, 4d6kh3, 2d20kh1, 1d100

About this generator

The first thing every dice roller online does badly is the d20. They roll it, sure, but they treat it like a number from 1 to 20, not like a die. No critical highlight on a natural 20. No advantage. No disadvantage. No memory of the last roll. It works, but it doesn't feel like a die.

This roller is built for D&D night first, and incidentally everything else. Type 1d20, hit roll, and a 20 turns gold. A 1 turns red. Toggle advantage and you get two rolls with the lower one struck through. Toggle disadvantage and the higher one greys out. The notation field accepts everything you'd actually use at a table — 3d6+2, 4d6kh3 for ability scores, 2d20kh1 as a manual advantage roll, chained expressions like 1d8+1d6+5. Whitespace and case are ignored.

Underneath, every die is rolled independently with crypto.getRandomValues and rejection sampling — meaning a d6 actually has a one-in-six chance of each face, not a one-in-six-ish chance with a tiny boundary bias. The difference is microscopic but real, and at a long campaign with thousands of d20s, the bias matters. The result of every roll lives only in your browser; nothing is stored on a server, and the last 10 rolls show up in the history strip below the result.

What this is not: a digital DM screen, a probability simulator, or a tabletop simulator. If you need to plan combat math, look at anydice. If you need shareable session-state, use a VTT. If you just want to roll dice without opening a bag, this is the fastest tool you can find.

What people use it for

Most rolls fall into a handful of buckets — here they are.

D&D and other TTRPGs

Attack rolls, saving throws, ability checks, damage. Advantage and disadvantage one tap away, crits flagged in gold so you don't miss a Sneak Attack opportunity.

Stat generation

Roll 4d6kh3 six times for a fresh character. The keep-highest-3 syntax does the dropping for you.

Board games without dice

Lost the d6? Need a d4 nobody owns? Type the die, roll, move on. The result URL keeps the configuration handy for next session.

Classroom decisions

Pick a chapter (1d20), choose a question number (1d12), assign group order. Visible randomness ends every "why me."

Math practice

Drill addition by rolling 2d10+5, multiplication with 1d10*1d6 on paper. Real dice, no batteries.

Chance experiments

Roll 1d6 a hundred times and tally — a quick, hands-on demo of the law of large numbers without a Python notebook.

How it works

Source of randomness

Every die is an independent draw from crypto.getRandomValues — fresh OS entropy per roll. No Math.random, no shared seed, no risk of repeating sequences across reloads. Each face of an N-sided die is exactly 1/N probable.

Rejection sampling

To go from a 32-bit unsigned integer to "a number 1 through N" without bias, we compute limit = floor(2³² / N) * N, draw a 32-bit value, and re-roll if it lands at or above the limit. Naive v % N would slightly favor lower faces when N doesn't divide evenly into 2³². For a d20 the bias would be tiny but real over thousands of rolls; rejection sampling removes it.

Notation parser

The string is tokenized into terms — NdS, NdSkhK, NdSklK, or a flat integer modifier — joined by + or -. Each NdS rolls N independent dice. Keep-highest and keep-lowest sort the rolls and drop the rest, which is the same shape as the D&D 5e ability-score roll. The total is the sum of kept dice plus all modifiers.

Advantage handling

For a single d20, advantage rolls two dice and keeps the higher; disadvantage keeps the lower. Both rolls render so you can see the alternative. Per the rules, advantage and disadvantage cancel — toggling both back to neither.

State & sharing

Notation, advantage state, and quick-die selection are encoded in the URL (?n=3d6%2B2&adv=1). Loading the URL anywhere — a different browser, an embed, a bookmark — restores the same configuration. The roll itself is fresh each time; the URL doesn't store the result.

Drop this roller anywhere.

Stick a d20 on your campaign blog, a stat-roll widget on a character-sheet page, or a random encounter generator on your DM site. One iframe.

Embed docs →
<iframe src="https://randomgen.net/dice/embed/"
  width="100%" height="480"
  loading="lazy"></iframe>

Common questions

What dice notation does this support?

All the common ones: NdS for N dice of S sides, +M or -M modifiers, NdSkhK to keep the highest K dice, NdSklK to keep the lowest, and chained expressions like 2d6+1d4+3. Whitespace is ignored, case-insensitive.

How does advantage and disadvantage work?

Toggle Advantage on for d20 rolls and we roll twice, keep the higher. Disadvantage rolls twice and keeps the lower. Both rolls render so you can see what you didn't get.

Per 5e rules, advantage and disadvantage cancel each other out — turning both on gives you a normal single roll.

Is the roll really random?

Yes. Every die uses crypto.getRandomValues with rejection sampling, so each face is exactly equally likely — no off-by-one bias from naive modulo. Math.random is never called.

What is a natural 20 here?

A roll where a single d20 lands on 20 is highlighted as a critical hit (gold), and a 1 is highlighted as a critical miss (red). The highlight only fires for d20s and only on the raw die face — modifiers, sums of multiple dice, and 4d6kh3 totals are not checked.

Can I share or bookmark a specific roll setup?

Yes. The notation field, advantage state, and selected quick die all live in the URL. Anyone who opens the link gets the same configuration. The roll itself is fresh each time — only the setup is preserved, not the result.

What's the highest die I can roll?

Up to d10000, with up to 100 dice in a single expression. Past that, the readability drops and the breakdown gets unwieldy. For tabletop use, the standard set (d4, d6, d8, d10, d12, d20, d100) covers everything.

Does it remember my last rolls?

The last 10 rolls are kept in your browser's localStorage so they're still there if you reload. Nothing is sent to a server, and clearing your browser data wipes the history.