Dice roller — 2d6+3 / 4d6kh3 notation (Web Crypto, no server)
Roll TTRPG / board-game dice using familiar notation: 2d6+3, 1d20-2, 4d6kh3 (keep highest 3), 3d6+1d4-1, and more. Randomness uses the Web Crypto API (crypto.getRandomValues with rejection sampling) for an exactly uniform distribution. Comes with one-click presets (d4 / d6 / d8 / d10 / d12 / d20 / d100 / 3d6 / 4d6kh3, …) and an in-browser history of the last 20 rolls. Nothing is uploaded.
How to use
1. Type a dice expression directly, or click a preset (d6 / 3d6 / 4d6kh3, …) to insert it. 2. Press "Roll" to see the result — individual rolls plus the total. 3. To re-roll the same expression, use "Roll again". 4. Up to 20 most recent rolls are kept below as a battle log. Supported notation: - `NdM` — N dice of M sides (e.g. 2d6) - `+const` / `-const` — modifiers (e.g. 2d6+3, 1d20-2) - `khN` / `klN` — keep highest / lowest N (e.g. 4d6kh3 for D&D ability scores) - `dhN` / `dlN` — drop highest / lowest N - Combined — chain multiple terms like 3d6+1d4-1
FAQ
- Is my input uploaded?
- No. Everything runs in your browser. Even the random numbers are generated locally via the Web Crypto API.
- How fair is the randomness?
- We pull 32-bit integers from crypto.getRandomValues and apply rejection sampling for dice whose face count is not a power of two (e.g. d100). The resulting distribution is provably uniform — strictly fairer than Math.random(), and especially noticeable on dice with few faces.
- What does 4d6kh3 mean?
- Roll four d6 and keep the highest 3. This is the standard D&D ability-score generation method. 'kh' = Keep Highest. Variants: kl (keep lowest), dh (drop highest), dl (drop lowest).
- What about 2d20kh1 / 2d20kl1?
- Those are D&D 5e's 'advantage' / 'disadvantage' checks. Roll two d20 and keep the higher (kh1) or lower (kl1).
- What are the upper limits?
- Each term allows 1–1000 dice with 2–1,000,000 sides. Plenty for everyday games.
- Does the history persist?
- No. It lives only in memory for the current tab and clears when you navigate away or close the page. Persistence may come later.
Related tools
Password generator — strength, char sets, length
Generate strong random passwords in batches of 1–25. Pick length, character sets, and toggle look-alike exclusion. Backed by crypto.getRandomValues and runs entirely in your browser.
UUID generator — v4 / v7 batch generation
Generate UUID v4 (random) or UUID v7 (timestamp-prefixed) in batches of 1–100. Backed by crypto.getRandomValues and runs entirely in your browser.
Hash generator — SHA-1 / 256 / 384 / 512
Generate SHA-1, SHA-256, SHA-384, and SHA-512 digests from text in parallel. Powered by the Web Crypto API and runs entirely in your browser.
Barcode generator — JAN / EAN / UPC / CODE128 / CODE39
Turn numbers or text into 1D barcodes (JAN-13 / EAN-13, JAN-8 / EAN-8, UPC-A, CODE128, CODE39, ITF, Codabar/NW-7, MSI) and export them as PNG or SVG. Fine-tune bar width, height, colors, margin, and whether the human-readable value is printed below. Check digits are validated automatically. Everything is generated inside your browser — the value you enter never leaves your device.