Flip coins and roll polyhedral dice with cryptographic-grade fairness. Supports the seven standard tabletop dice (d4, d6, d8, d10, d12, d20, d100) with configurable dice counts, and a persistent roll history that survives page reloads.
How the randomness works
Every flip and roll uses crypto.getRandomValues — the browser’s built-in source of cryptographic-grade entropy. This is the same RNG used for generating session tokens, encryption keys, and UUIDs — it pulls from OS-level sources (disk jitter, interrupt timing, hardware RNG where available) and passes rigorous statistical tests. To convert the raw random bytes into dice values, the tool uses rejection sampling, which eliminates the subtle bias that naive % operations introduce when the range doesn’t evenly divide the RNG’s output space.
Net result: every face of every die is exactly equally likely on every roll, with no patterns, no correlations, no drift. The rolls are more uniform than physical dice — manufacturing imperfections, imbalance, and throwing surface all bias real dice slightly, and software dice have none of those.
Coin flips
Pick “Coin” mode, enter how many flips, click “Flip”. You get:
- The individual flip sequence (H, T, T, H, …)
- Heads and tails counts
- The full sequence as coloured pills for quick visual scanning
Flip one coin for a yes/no decision, or a hundred at once to get a feel for how the law of large numbers works (50/50 ± a few percent). If you want to analyse the resulting sequence, the descriptive statistics calculator handles mean, stdev, and friends.
Dice rolls
Pick “Dice” mode, select a die size with the pill buttons (d4 through d100), enter how many dice, click “Roll”. You get:
- Each individual roll
- The sum
- Standard dice notation (“3d6 = 4, 3, 5 → 12”) so you can copy results into an RPG log
Multiple dice are rolled independently — rolling 2d6 is equivalent to rolling a single d6 twice and adding, not rolling a single 2d6-distribution value (the difference matters for skewed distributions: 2d6 peaks at 7, while a hypothetical flat d11 would be uniform across 2–12).
Example: D&D ability score roll
4d6 drop lowest is a classic ability-score method. Roll 4d6 here, then mentally drop the lowest value and sum the rest. For 4d6 = 4, 3, 5, 6, drop the 3 → 4 + 5 + 6 = 15. Repeat five more times for a full set of ability scores.
Example: coin flip for a decision
One flip, one answer. H = do A, T = do B. Takes about 2 seconds including page load. Especially useful when the decision genuinely doesn’t matter and you just want to stop debating.
Example: 100 flips for fairness demo
Flip 100 coins. You should see 50 ± 5 or so heads — rarely exactly 50, but almost always between 40 and 60. If you see 80 heads out of 100, the probability of that under a fair coin is vanishingly small (about 1 in 2 million) — it’d be strong statistical evidence that the coin is biased, which for this software RNG means something went badly wrong somewhere.
Roll history
The tool keeps up to 50 recent rolls in your browser’s localStorage. Close the tab, come back tomorrow, and your history is still there. Each entry shows the notation and the result, in reverse chronological order (newest first). Nothing leaves your browser — localStorage is purely client-side, tied to the origin, with no network requests. The “Clear” button wipes the history if you want a fresh slate.
Standard dice and what they’re for
- d4 (tetrahedron): lowest-damage weapons in D&D (daggers, darts), small healing spells
- d6 (cube): the common dice everyone owns; used everywhere
- d8 (octahedron): medium damage, some utility spells
- d10 (pentagonal trapezohedron): percentile dice, some spell scaling
- d12 (dodecahedron): heavy weapons, rare spell damage
- d20 (icosahedron): attack rolls, saving throws, skill checks — the defining die of D&D and Pathfinder
- d100 (Zocchihedron, or a pair of d10s): percentile rolls, loot tables, percentile skills in CoC and other systems
What this tool does not do
It doesn’t parse full dice notation. “2d6+3” or “4d6 drop lowest” requires a notation parser. Use a dedicated RPG tool for anything with modifiers or expressions.
It doesn’t support exploding, rerolling, or advantage/disadvantage mechanics. Each roll is a single independent draw from [1, sides]. For system-specific mechanics (D&D 5e advantage = roll 2d20, take higher; exploding dice = reroll on max), you need a game-aware tool.
It doesn’t simulate non-standard dice sizes (d3, d7, d30). Use the general random number generator with custom bounds for those.
It doesn’t support weighted dice or bias simulation. Every face is equally likely. For simulating loaded dice or probability distributions beyond uniform, you need a different tool.
It doesn’t sync history across devices. localStorage is per-browser-per-origin. Rolls you make on your laptop won’t show up on your phone.