Free Random Number Generator
Generate random numbers in any range, create unique number lists, or roll dice. Uses cryptographically secure randomness.
🔒 Every number uses your browser's cryptographically-secure randomness (crypto.getRandomValues) — genuinely fair, not the predictable Math.random(). Nothing is sent anywhere. Even so, do not use these numbers for cryptographic key generation, security tokens, or regulated lottery/gambling applications, which require audited, hardware-certified randomness sources.
Common uses
- Generate Lottery NumbersPick random lottery numbers for Powerball, Mega Millions, EuroMillions, and other draws.
- Pick a Random Winner for GiveawaysFairly select a random winner from a numbered entry list for competitions and giveaways.
- Roll Dice for Tabletop GamesRoll any combination of dice — d4, d6, d8, d10, d12, d20, d100 — for D&D and tabletop RPGs.
- Random Sampling for ResearchGenerate random samples, assign random IDs, or select a random subset from a numbered dataset.
- Generate Test Data Random NumbersCreate large lists of random numbers for testing algorithms, filling databases, and stress-testing systems.
How It Works
Every number this tool generates comes from crypto.getRandomValues — the browser's cryptographically secure random source, the same one used for TLS key generation. A hand-written rejection-sampling algorithm sits on top to eliminate the modulo bias that plagues simple Math.random() % range implementations, including ranges wider than 2^32 via BigInt arithmetic.
- 1Set your range and modeChoose between a single number, a batch list (up to 1000), or polyhedral dice (d4 through d100). For lists you can also require unique values and optionally sort the output ascending.
- 2crypto.getRandomValues draws raw entropyEach number is drawn from a Uint32Array (or BigUint64Array for ranges wider than 2^32) filled by the browser's cryptographic RNG — not Math.random(). Rejection sampling then discards values that would skew the distribution, so every integer in your range has exactly equal probability.
- 3Unique-value mode uses Fisher-Yates or rejection trackingWhen unique mode is on and the range fits in memory (up to 100,000 values), the tool materialises the full pool and shuffles it with Fisher-Yates. For very large ranges it instead draws values one at a time, skipping repeats — avoiding the memory cost of constructing a billions-entry array.
- 4Results land with animated feedback and stay in session historyThe final values animate into place (a slot-machine roll for numbers, tumbling dice for dice mode) using requestAnimationFrame, then appear in a scrollable history log you can copy at any time. Nothing leaves your browser.
Related Tools
Dice Roller
Roll 1 to 10 dice (d4, d6, d8, d10, d12, d20 or d100) with a short animation, see the total and each result, and keep a list of recent rolls.
Random Color Generator
Generate random colours one at a time or as a palette of five, lock the ones you like, copy HEX, RGB or HSL values and export the palette as PNG or CSS.
Coin Flip & Spin Wheel
Flip a virtual coin, spin a customizable wheel, or randomly pick from a list of options. Uses your browser’s cryptographically secure randomness — not a verifiable public draw, so avoid regulated contests.