Dice Roller
Roll tabletop dice with keep-highest or lowest rules, modifiers, visible rolls and history export.
This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.
Roll bounded dice expressions with keep-highest or keep-lowest rules, modifiers, visible dropped dice and CSV history.
How to use it
- 1Enter a dice expression or choose an advantage/disadvantage preset.
- 2Roll and review every kept or dropped die plus the final arithmetic.
- 3Copy the result or download the latest 100 rolls as CSV.
What happens to your data
Random values come from local Web Crypto. History remains in page memory and is not uploaded, certified or publicly authenticated.
Last updated October 2026
Roll tabletop dice from a compact expression, keep the highest or lowest results, and inspect every die before copying or exporting the total. The advantage preset rolls two twenty-sided dice and keeps the higher result; disadvantage keeps the lower. A 4d6kh3 preset rolls four six-sided dice and retains the highest three, making the discarded die visible instead of hiding how the total was obtained.
The die values are generated locally with the browser’s Web Crypto source. A result includes the normalized expression, each rolled value, whether it was kept or dropped, the subtotal and the modifier. The latest 100 rolls remain in this page’s memory and can be downloaded together as CSV. No account, shared room, server roll or persistent log is required.
How it works
The basic notation is NdS: N dice with S sides. For example, 3d6 rolls three dice with faces from one to six. Append khN to keep the highest N results or klN to keep the lowest N. Add a signed modifier at the end, such as 2d20kh1+5 or 4d6kh3-2. The modifier is applied once to the sum of retained dice, not separately to every die. Preset buttons fill the expression; press Roll dice to generate the result.
Expressions are parsed as data and are never executed as code. Use 1–100 dice, 2–1,000 sides, at least one kept die, and a modifier from −999 to +999. The kept count cannot exceed the rolled count. Decimal counts, fractions, arithmetic chains, exploding dice, rerolls and unsupported operators are rejected with an error. The field is limited to 64 characters. If your game uses a more complex rule, roll the simpler components separately and apply that rule yourself.
For keep-highest and keep-lowest, values are ranked numerically. Ties keep the earlier rolled die first, so the display is stable and exactly the requested number are retained. This tie rule does not change a total when the tied faces are equal. The output displays every roll in its original order, with a text label for kept or dropped so the distinction does not depend on color. Editing the expression clears the current result, while historical entries retain the expression they actually used.
The random mapping avoids modulo bias. A random unsigned 32-bit value spans 2^32 possibilities. Because that count is not divisible by every number of die sides, the incomplete block at the end is rejected before the remaining value is mapped to a face. Rejection sampling makes the mapping uniform when the browser’s source is uniform. The browser supplies cryptographically strong pseudorandom values; this tool does not claim direct hardware randomness, independent certification, a public audit trail or suitability for regulated gambling.
History is newest first and capped at 100 rolls. Download history CSV includes the expression, all rolled values, retained values, dropped values, modifier and total. Semicolons separate multiple dice within a quoted cell. Leaving or reloading the page discards history. Exported totals document the displayed outcome but do not authenticate who generated it or prevent someone from making another roll.
Worked example: keep three of four dice, then add two
- Input
- 4d6kh3+2 with example rolls 2, 6, 4, 1
- Result
- Keep 2, 6 and 4; drop 1. Subtotal 12 + modifier 2 = total 14.
These are illustrative rolls for the arithmetic. Pressing Roll dice generates new random values, so the output can differ.
Common use cases
- Rolling advantage or disadvantage for a tabletop game
- Generating a four-die roll with the lowest result discarded
- Checking how a modifier affects retained dice
- Keeping a CSV record of a classroom probability exercise
Frequently asked questions
How do I roll advantage or disadvantage?+
Use 2d20kh1 for advantage or 2d20kl1 for disadvantage, or select the corresponding preset. Both dice stay visible and the retained die is labeled. Any final modifier is added after selecting the die.
How do I roll 4d6 and drop the lowest?+
Enter 4d6kh3. It rolls four six-sided dice and keeps the highest three. To add two afterward, use 4d6kh3+2. The result shows the dropped value and the full arithmetic.
Are tied dice handled consistently?+
Yes. When a keep boundary cuts through equal values, the earlier die in the original roll order is kept first. Exactly the requested count is retained, and choosing a different equal face would not change the total.
Can I use custom dice or a negative modifier?+
Yes. The sides can be any whole number from 2 to 1,000, with 1–100 dice. A signed modifier between −999 and +999 is applied once to the retained sum. Negative totals are possible and are shown as calculated.
Does the roller support exploding dice, rerolls or a shared game room?+
No. Its bounded grammar supports one dice group, an optional keep-highest or keep-lowest rule, and one modifier. It does not execute arbitrary expressions, publish rolls or synchronize with other players.
Standards and limitations
Related tools
Random Number Generator
Generate exact random integers with exclusions, no repeats and local TXT or JSON downloads.
LCM & GCF Calculator
Find exact LCM and GCF/HCF/GCD answers with prime-factor and Euclidean steps you can verify.
Percentage Calculator
Calculate percentages, reverse changes, compound changes and percentage points with a CSV breakdown.
Mock Data Generator
Generate repeatable test data from a custom schema; export JSON, CSV, NDJSON or SQL.