Random Number Generator — Free, Fair Picks

Random Number Generator

Random Number Generator picks fair, unbiased random numbers in any range you set. Run raffles, choose contest winners, generate lottery combinations, simulate dice rolls or pick a random student from a class list.

Optional no-repeat mode guarantees unique picks (perfect for draws), and sorting arranges lottery-style results neatly.

How to use the random number generator

  1. Set the minimum and maximum of your range.
  2. Choose how many numbers to draw (up to 1000).
  3. Toggle “No repeats” for raffle-style unique picks, and “Sort” for ordered output.
  4. Click “Generate” and copy the results.

Key features

  • Any range: from 1–6 dice to 1–1,000,000 draws.
  • No repeats mode: unique picks for fair raffles and lotteries.
  • Bulk draws: up to 1000 numbers at once.
  • Sort option: ascending order for lottery tickets.

Frequently asked questions

Is the generator really random?

Yes — it uses the browser’s cryptographic random source, giving every number in the range an equal chance on every draw.

How do I pick a raffle winner fairly?

Set min 1, max = number of entries, count 1, and enable “No repeats”. Each entry has an identical chance.

What happens if I request more unique numbers than the range allows?

The tool stops you with a clear message — you can’t draw 10 unique numbers from a range of 5.

Can I use this for a lottery ticket?

For fun and number-picking, absolutely. Real lottery draws are uniformly random, so any combination has the same odds.

Pro Tips

  • Giveaways: number your entrants 1–N and generate a winning number live for transparency.
  • Classroom picks: teachers can randomly select students fairly.
  • Decide ranges wisely: narrow ranges (1–10) for quick picks, wide ranges for unique IDs or simulations.

More FAQs

Are the numbers truly random?

Yes — generated with your browser’s cryptographic RNG, suitable for games, draws, and sampling (but not for cryptography keys or gambling).

Can I generate numbers with no repeats?

Generate a batch and discard duplicates, or generate within a range larger than the count you need.

How It Works: Under the Hood

Browser-based generators use crypto.getRandomValues(), a cryptographically secure PRNG seeded from OS entropy (hardware noise, timing jitter) — unpredictable even if you know all previous outputs. This differs from Math.random(), a fast non-crypto PRNG (xorshift128+) fine for games but predictable given enough outputs. Mapping to a range must avoid modulo bias: if the RNG emits 0–255 and you want 1–100, naive n % 100 favors low numbers because 256 isn’t divisible by 100 — correct implementations use rejection sampling (discard values ≥ the largest unbiased multiple). Each draw is independent and uniformly distributed: every number in the range has exactly equal probability, with no memory of previous draws.

Real-World Use Cases

  • Giveaway winners: number entrants 1–N, generate one number live on camera — transparent and auditable, unlike “I picked randomly”.
  • QA sampling: pull 50 random order IDs from 10,000 for quality audits — random sampling catches issues that cherry-picked checks miss.
  • Classroom fairness: teachers selecting students for presentations — the generator removes accusations of favoritism.
  • Game mechanics: loot drops, dice rolls, and procedural content where unpredictability is the gameplay.
  • A/B test bucketing: assign users to variants by random draw for clean experimental design.

Advanced Tips

  • Use the crypto RNG for anything fairness-critical. Giveaways, draws, and selections deserve crypto.getRandomValues() — Math.random() is fine for games, not for prizes.
  • Document the draw. Screenshot the result with a timestamp, or record the screen. For public giveaways, proof of randomness is as important as randomness itself.
  • Pre-commit to the methodology. Announce “we’ll draw one number 1–500” before drawing. Deciding the rules after seeing the result destroys trust.
  • Generate in wide ranges for uniqueness. Need 100 unique IDs? Draw from 1–1,000,000, not 1–100 — collisions vanish and you skip dedup logic.
  • Seed and log for reproducibility. When debugging game logic or simulations, record the seed alongside results — replaying the exact sequence is the only way to reproduce a “random” bug.

Common Mistakes to Avoid

  • Using Math.random() for security. Tokens, password salts, and session IDs from a predictable PRNG are crackable — always use the crypto API for secrets.
  • Modulo bias in hand-rolled code. If you implement your own range mapping with %, small ranges on large outputs skew results — use rejection sampling or a library.
  • Re-rolling until you like the answer. “Best of five” draws aren’t random selection — they’re selection with extra steps. One draw, accept it.
  • The gambler’s fallacy. After five reds, black is not “due” — each draw is independent. Streaks are normal in truly random sequences.
  • Confusing shuffled with sorted-random. A proper Fisher–Yates shuffle gives every permutation equal probability; naive “sort by random()” comparators are biased and can even crash on some engines.

Raffles and Giveaways Without the Drama

Nothing kills a giveaway faster than accusations of a rigged draw. Set the minimum to 1 and the maximum to your number of entries, draw a single number with no-repeat mode on, and you have a result nobody can argue with — every entry had an identical chance, drawn from your browser’s cryptographic random source. Screenshot the result for transparency, and re-draw instantly if the winner doesn’t respond. For multi-prize draws, generate several unique numbers in one go. Need names instead of numbers? The random name generator picks winners straight from a list.

Dice, Coins, and Game-Night Emergencies

Board game missing its dice? This tool is the fastest replacement: set 1–6 for a die, draw one number, and you’re rolling again in seconds. It handles jobs physical dice can’t — a 20-sided die, a 1–100 percentile roll, or ten unique numbers for a lottery-style draw, with the sort option arranging results neatly. Because draws are instant and unlimited, it also settles playground debates about who goes first without anyone crying foul. For unique identifiers in code or test data, the UUID generator creates IDs instead of plain numbers.

Frequently Asked Questions

Can I generate the same sequence twice?

No — there is no seed or replay option. Every draw is fresh and independent, which is exactly what fair selection requires.

Is there a limit to how many numbers I can draw?

You can draw up to 1000 numbers in a single batch. For no-repeat draws, the count can’t exceed the size of your range.

Does it work on mobile?

Yes, the generator runs fully in your mobile browser — set your range, tap generate, and copy the results.