What is a random number generator?
A random number generator picks numbers from a range so that every possible value has the same chance of being chosen. People use it to draw raffle and giveaway winners, pick lottery numbers, roll dice for board games, assign participants to groups, sample rows for testing, or create test data.
This generator uses your browser's Web Crypto API (crypto.getRandomValues) by default — the same source used for encryption keys — and rejection sampling, so there is no modulo bias towards smaller numbers. You can switch to Math.random if you prefer, but there is rarely a reason to.
Generate up to 10,000 integers or decimals at once, require unique values (no repeats, like drawing from a bag), sort the results, and choose how they are separated for pasting into a spreadsheet or code. Summary statistics — sum, mean, minimum and maximum — are shown for each set.
How to use the Random Number Generator
- Pick a preset such as Dice, Coin flip or Lottery, or set your own minimum and maximum.
- Choose integers or decimals; for decimals, set how many decimal places you need.
- Enter how many numbers to generate and tick Unique numbers if values must not repeat.
- Choose a sort order and separator, then click Generate. Copy or download the list.
Example: a 6/49 lottery line
Minimum 1, maximum 49, quantity 6, unique, sorted ascending:
4, 11, 23, 30, 38, 47How the numbers are generated
- The range is converted to a list of possible values — for decimals, every value at your chosen precision, so 0.00 to 1.00 has 101 options and both ends are included.
- A random index is drawn with
crypto.getRandomValues; draws that would bias the result are discarded and redrawn. - Unique sets use a partial Fisher–Yates shuffle, so every combination is equally likely and generation stays fast even for huge ranges.
- Nothing is sent to a server, and results are not stored.
Frequently Asked Questions
Are these numbers truly random?
They come from the operating system's cryptographically secure generator via the browser, which is unpredictable for all practical purposes and suitable for draws and security-sensitive uses. For official lotteries or regulated gambling, use the audited process those rules require.
Are the minimum and maximum included?
Yes. With minimum 1 and maximum 6, every value from 1 to 6 is possible — exactly like a die.
Why can't I generate 20 unique numbers between 1 and 10?
There are only 10 distinct values in that range, so 20 unique numbers are impossible. Widen the range, lower the quantity or untick Unique numbers.
How do I pick a random winner from a list of names?
Number the entries, then generate one number between 1 and the number of entries. For several winners, tick Unique numbers so nobody is picked twice.
Can I generate random strings or passwords instead?
Yes — use the Random String Generator for codes and tokens, the Password Generator for passwords, or the UUID Generator for unique IDs.