Something wrong with this tool?
About Random Number Generator Online
This tool generates random numbers using your system's cryptographic randomness source. Specify the range (min and max), how many numbers to generate, and whether to allow duplicates — the tool produces a fresh, unbiased sequence each time.
Random numbers are needed for lotteries and raffles, random sampling, scientific simulations, game design (random encounters, loot drops, dice rolls), password generation, and statistical analysis.
Output can be one-per-line, comma-separated, or as a JSON array. Use the unique mode for raffle-style picks where no number should repeat; use duplicates allowed for simulating coin flips, dice rolls, or other independent random events.
How to use this tool
How to generate a random integer in a chosen inclusive range
Set the range
"Min" and "Max" are inclusive bounds. The tool returns an integer N with `min ≤ N ≤ max`. Equal bounds produce that single value every time; if `min > max` the tool throws "Min must be ≤ max."
Press Run
Result returns a single `value` field. Distribution is uniform — each integer in the range is equally likely. Powered by `Math.random()`, which is fine for trivia and tie-breakers but NOT cryptographically secure.
When you need crypto strength
Anything involving money, raffles, security tokens, or anti-fraud should NOT use this tool. Generate server-side with `crypto.randomInt(min, max + 1)` (Node) or `window.crypto.getRandomValues` in browsers.
Avoiding bias for tiny ranges
For ranges of just 2-3 values, the difference between `Math.random()` and crypto-strength is undetectable. For sampling thousands of small ranges in series (e.g. shuffling), the cumulative bias of `Math.random` becomes measurable.