Random Number Generator
Generate one or many random numbers in any range, with or without duplicates, using your browser's secure randomness.
How to use the Random Number Generator
- Set the minimum and maximum values.
- Choose how many numbers to generate.
- Decide whether duplicates are allowed and whether to sort the output.
- Click Generate, then Copy the results.
Examples
| Input | Output | Notes |
|---|---|---|
min 1, max 100, count 1 | e.g. 73 | A single random pick. |
min 1, max 49, count 6, no duplicates | e.g. 3, 11, 24, 28, 39, 45 | A lottery-style draw. |
min 0, max 1, count 5, decimals | e.g. 0.42, 0.07, 0.88, 0.51, 0.19 |
How the randomness works
This generator calls crypto.getRandomValues(), the Web Crypto API's cryptographically secure pseudo-random number generator (CSPRNG). It uses rejection sampling to avoid modulo bias, so every number in your range is equally likely.
Common uses
- Prize draws, raffles and giveaways
- Lottery and bingo number simulation
- Picking a random winner, sample or test case
- Games, dice and decision-making
- Randomising the order of a list
Random numbers vs random choice
Need to pick from a list of names or options rather than a numeric range? Assign numbers to your items and use this tool, or use a dedicated random choice picker.
Frequently asked questions
Is this random number generator truly random?
It uses the browser's crypto.getRandomValues API, a cryptographically secure pseudo-random number generator seeded by the operating system. It is far stronger than Math.random and suitable for raffles, draws and games.
How do I generate numbers with no repeats?
Turn off "allow duplicates". The generator will then return a set of unique numbers. Note that the count cannot exceed the size of the range when duplicates are disabled.
Can I generate decimal numbers?
Yes. Switch the type to "decimal" and choose how many decimal places you want.
Can I use this for a prize draw?
Yes. Assign each entrant a number, set the range to match, generate one number with duplicates off, and that entrant wins. Repeat for multiple winners.
Are the results saved?
Recent results are kept in a history list on the page during your session only. Nothing is sent anywhere or stored permanently.