Random Number Generator
Generate random numbers or PINs within any custom range.
How to use the Random Number Generator
- Set the Min and Max values — both ends of the range are included.
- Choose how many numbers to draw (up to 1,000).
- Tick Unique values if no number may repeat, as in a raffle or a lottery-style draw.
- Press Generate; press it again for a fresh draw, or Copy to keep the results.
About the Random Number Generator
This tool generates one or more random numbers within a minimum and maximum range that you set — useful for anything from picking a raffle winner, rolling a virtual die, generating a temporary PIN, to selecting a random sample from a numbered list.
Numbers are produced using your browser's random number generator, and you can choose whether repeated values are allowed when generating multiple numbers at once (useful for lottery-style draws where each number should be unique).
Worked example
Example: setting the range to 1–100 and generating 5 unique numbers might return 7, 42, 63, 18, 91 — useful for drawing five raffle winners from 100 tickets without any duplicates.
How the numbers are drawn
Both the minimum and maximum are included, so a range of 1–6 behaves like a die. Each number is drawn independently using your browser's cryptographically secure random source (crypto.getRandomValues), which isn't predictable from earlier results. With 'unique values' turned on (the default), a number that has already come up in the batch is discarded and drawn again, so you can't ask for more numbers than the range contains.
Duplicates are more likely than you'd think
With unique values turned off, repeats appear surprisingly often. Draw just 5 numbers from 1–100 and there's about a 10% chance two of them match; draw 23 numbers from 1–365 and a repeat is more likely than not — the same math as the famous birthday paradox. If a repeat would be a problem, such as when picking several different winners, turn on unique values.
Running a fair draw
- Number your entries first, from 1 up to the total, then set exactly that range. A range larger than your list means some draws land on no entry.
- Decide the rules before drawing: how many winners, whether one person can win twice, and what happens if a winner can't be reached.
- For anything public, draw once with witnesses or on a recorded screen share rather than regenerating until you like the result.
- For a random sample from a spreadsheet, generate unique row numbers here and pick those rows.
Frequently asked questions
- Can I generate more than one number at a time?
- Yes — set the quantity field to however many numbers you need, and optionally require unique values so no number repeats in the same batch.
- Is this suitable for generating a secure PIN?
- For casual use like a temporary door code, yes. For anything security-sensitive (banking PINs, account recovery codes), use the dedicated password generator, which uses cryptographically secure randomness and supports longer, more complex values.
- Can the range include negative numbers?
- Yes — set the minimum value below zero and the generator will include negative numbers in its range.
- How random is the number actually?
- The generator uses your browser's standard random number function, which is statistically well-distributed and suitable for games, raffles, and sampling, though not intended for cryptographic key generation.