A random number generator is a tool that picks one or more integers from a range you define, returning each value with the same chance of appearing as any other value in that range, including the endpoints. To use one, you enter the smallest allowed integer and the largest allowed integer, choose how many values you want, decide whether repeats are allowed, and then click a generate button. The result is delivered as a comma-separated list you can copy or read directly on screen. This article walks through each step using our browser-based Random Number Generator, which combines those inputs with cryptographic randomness and rejection sampling so no value has an unfair advantage over another. With three inputs and a single button, the tool covers most everyday needs — classroom draws, raffle picks, dice-free game rolls, sample data for spreadsheets, and randomized A/B lists — without installing software or sending your bounds or results to any server.
You don't need a programming language, a spreadsheet formula, or a coin in your hand. The page reads your integers, validates them, draws from browser-side cryptographic sources, and hands you a finished list within a second. The rest of this guide explains what each input does, how the underlying sampling stays unbiased, and the limits you can hit at the edges of the safe-integer range.

How to Generate Random Numbers with the Tool
Open the Random Number Generator page and the inputs appear on a single screen. Follow these steps in order.
- Type the smallest integer you are willing to accept into the minimum field. Negative values are allowed, so the bound can sit below zero.
- Type the largest integer you are willing to accept into the maximum field. Both endpoints are eligible — a range of 1 to 10 can legitimately produce 1, 10, or any whole number in between.
- Enter the result count you need, anywhere from 1 to 1,000. This is how many integers the tool will draw in a single click.
- Decide whether duplicates are allowed. Leave the option on for independent draws where the same number may appear more than once; turn it off when every value in the output must be different.
- Click the Generate numbers button. The list appears as comma-separated integers you can select and copy.
- If you change any setting afterward, the previous list clears automatically so an old result cannot be mistaken for output from the new bounds.
For a complete randomized ordering of every integer in a small range — useful for seating charts or round-robin pairings — set the count equal to the range size and disable duplicates. For repeated simulations where each draw is independent, leave duplicates enabled and generate a fresh list whenever you need a new sample.
What Each Setting Controls
Each input shapes a different part of the output. The table below summarizes what changes when you adjust a single setting, so you can match the controls to the job at hand.
| Setting | What you enter | Effect on the output |
|---|---|---|
| Minimum | An integer (negative values allowed) | Lowest value that can appear; the endpoint is eligible |
| Maximum | An integer (negative values allowed) | Highest value that can appear; the endpoint is eligible |
| Result count | 1 through 1,000 inclusive | Number of integers returned per click |
| Duplicates | Allowed or blocked | Allowed = independent draws, repeats possible; Blocked = every value unique |
The inclusive range size must also be exactly representable as a JavaScript safe integer — a technical ceiling that stops the tool from rounding or silently dropping results when bounds get very large. Reversed bounds (a minimum greater than the maximum), decimal values, blank fields, infinity, and unsafe integers are rejected rather than fixed in the background.
How Unbiased Sampling Works Under the Hood
Raw random bits from a browser do not divide evenly into every range. If you map eight random bits onto the integers 1 through 6 with a simple remainder operation, the values 1, 2, 3, and 4 appear slightly more often than 5 and 6, because the leftover group of possible bit patterns is incomplete. That small bias is invisible on a single draw but grows over thousands.
The generator avoids this with a method called rejection sampling. The page pulls 32-bit words from the browser Crypto.getRandomValues interface, combines them into an exactly representable 53-bit value, checks whether that value falls inside a complete remainder group, and discards anything in the incomplete tail. A retried draw happens instantly, and only fully accepted values are mapped onto the requested range — so each integer receives the same number of possible accepted raw values. You can read the underlying specification for the cryptographic source through the MDN Crypto.getRandomValues reference and the W3C Web Cryptography API.
When duplicates are blocked, the tool uses a sparse partial Fisher-Yates shuffle: rather than building an array for every integer in the range (which could be huge when the bounds are far apart), it shuffles a small offset list in O(count) memory and maps the offsets back into your range. The result is unique values without memory blowups on large spans.
Common Ways to Use a Random Number Generator
The most frequent uses fall into a few recognizable patterns.
- Classroom and raffle draws. Pick a numbered participant from a known roster. Disable duplicates so the same person is not drawn twice.
- Sample data for spreadsheets and tests. Generate a fixed list of unique IDs in a chosen range to populate a sheet. Our guide on generating random numbers in Google Sheets shows how to handle the same need from inside the spreadsheet itself.
- Game and dice stand-ins. Roll virtual dice, shuffle play order, or randomize a grid. The Dice Roller covers dice-specific shapes if you want dedicated d4 through d20 output.
- Randomized orderings. Order every entry in a small range by setting the count to the range size and disabling duplicates.
- Simulations and A/B tests. Leave duplicates enabled so every draw is independent of the previous one.
None of these uses require sending your numbers anywhere. The page runs entirely inside the current browser session, so the bounds you choose and the values you receive never leave your device.
Limits and Edge Cases Worth Knowing
The tool is generous within its scope and deliberate about its edges. The following rules are enforced by design.
- Safe-integer bounds only. Inputs are limited to JavaScript safe integers because larger numeric text cannot always be represented exactly in the browser. For values wider than the safe-integer ceiling, you would need an arbitrary-precision system that accepts integer strings.
- Inclusive range size must be exact. A range whose size is not exactly representable as a safe integer is rejected. This prevents the tool from presenting rounded or off-by-one results as exact.
- Impossible unique requests fail loudly. If you ask for five unique values from the range 1 through 3, the generator reports that the request is impossible rather than retrying forever or silently returning fewer numbers.
- Up to 1,000 numbers per call. The 1-to-1,000 cap on each operation prevents accidental memory-heavy requests and keeps results readable on screen.
- No audit trail for consequential draws. The page does not publish a seed, signed transcript, external randomness beacon, or reproducible audit trail. A visitor cannot later prove which browser entropy produced a particular list, so follow the independently audited procedures required by your organization for prizes, regulated drawings, access control, passwords, tokens, or other consequential decisions.
Treat the output as convenient general-purpose random integers — fair across the requested range, transparent about how it was drawn, and entirely local to your session.