Random number generator
Draw random integers from an inclusive range, choose unique results, and reveal a copyable list.
How it works & useful details
How it works & limits
Draw 1–100 integers using this browser's cryptographic random source. Rejection sampling avoids modulo bias. Unique draws sample without replacement; duplicates are otherwise possible. Draws are not retained after edits or refresh.
Bounds are inclusive integers from −1,000,000,000 to 1,000,000,000. This tool provides local randomness, not an independently auditable or certified draw.
Your working space
Change the values to explore the preview. Use the action below to create a copyable, downloadable result. All calculations stay on this device; refreshing clears your work.
About this tool
Random number generator draws integers from an inclusive range using your browser’s cryptographic random source. It can produce unique values when you need a sample without repeats, and the whole list is copyable.
Generation is local, so results are not logged anywhere. Treat them as random, not as secrets: for anything security-sensitive, use dedicated key material.
How to use it
- Set the lowest and highest values of the range.
- Choose how many numbers to draw.
- Enable unique results if repeats are not allowed.
- Generate the list and copy it.
How the numbers are drawn
Numbers come from the browser's cryptographic random source (crypto.getRandomValues), the same source used to generate encryption keys. A common shortcut, taking a random value modulo the range size, makes some results slightly more likely than others. This tool uses rejection sampling instead, so every integer in the range has the same chance.
With "unique" enabled, numbers are drawn without replacement, like pulling numbered tickets from a hat. Drawing 6 unique numbers from 1 to 49 gives a lottery-style set. Without it, repeats are possible and expected: with 23 draws from 1 to 365, the chance of at least one repeat is already just over 50%, which is the birthday paradox.
Good uses and limits
- Picking a winner from numbered entries, assigning random order to presenters, or sampling rows for a spot check.
- Generating test data within a fixed range.
- Deciding between options without bias, such as numbering them and drawing one.
For a public contest or raffle where participants need proof that the draw was fair, use a method that others can audit, such as a recorded live draw or a published commitment scheme. A browser draw cannot prove afterwards what it produced.
Frequently asked questions
Are the results truly random?
They come from the browser’s cryptographically secure random source, which is suitable for sampling; not for passwords or keys.
Why does the range limit the count when unique is on?
You cannot draw more distinct values than the range contains, so the tool rejects impossible requests instead of looping forever.
Can I reproduce a previous draw?
No. Each generation is fresh, and no seed is exposed or stored.
Are the bounds inclusive?
Yes. A range from 1 to 6 can produce both 1 and 6, like a die.
