Random Number Generator
Updated Free mock REST & WebSocket APIs
Pick a random number between any two values, or generate a whole list — unique (no repeats) or not, whole numbers or decimals, sorted if you like. Numbers come from your browser's cryptographically secure generator.
🔒 Uses your browser's cryptographically secure generator (crypto.getRandomValues) with unbiased sampling.
How to generate random numbers
- Enter the lowest and highest number you want — both are included (1 to 10 can return 1 and 10).
- Set how many numbers you need and tick “No repeats” if each number may appear only once.
- Choose integers or a number of decimal places, and optionally sort the results.
- Press Generate (or Enter). Copy the list, change the separator, or download it as a .txt file.
Unique numbers vs. repeats
With No repeats on, the tool draws without replacement — like pulling numbered balls from a bag — so you can never ask for more numbers than the range holds (there are only 10 different numbers from 1 to 10). With it off, every draw is independent, so duplicates happen sooner than people expect: draw just 23 numbers from 1–365 and there's a 50.7% chance two match (the birthday paradox).
Odds for common draws
| Draw | Chance of one specific outcome |
|---|---|
| 1 number from 1–10 | 1 in 10 (10%) |
| 1 number from 1–100 | 1 in 100 (1%) |
| 4-digit PIN (0000–9999) | 1 in 10,000 |
| 6 unique from 1–49 (order ignored) | 1 in 13,983,816 |
| 5 unique from 1–69 (order ignored) | 1 in 11,238,513 |
“Order ignored” draws use combinations: C(n, k) = n! / (k! (n − k)!). For 6 of 49 that's 49 × 48 × 47 × 46 × 45 × 44 / 720 = 13,983,816.
Why “unbiased” matters
The classic shortcut random % 6 slightly favours small numbers whenever the generator's range isn't a multiple of 6. This tool uses rejection sampling: random values that would cause that skew are thrown away and redrawn, so every number in your range has exactly the same probability. Decimals are drawn evenly from the grid of values with the chosen number of places, both ends included.
Related tools
Embed this tool on your site
Browse all embeddable tools →Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.
Get the embed code
Frequently asked questions
How random is it?
It uses crypto.getRandomValues, the browser's cryptographically secure random number generator (seeded by the operating system), plus rejection sampling so every outcome is exactly equally likely. That's stronger than the Math.random() most sites use.
Is the maximum included?
Yes. Both the minimum and maximum are possible results, so 1–6 behaves like a die.
Can I use it for a lottery or a giveaway?
Yes — use the lottery presets or set unique numbers and sort ascending. For drawing names instead of numbers, use the random name picker.
Can I generate negative or very large numbers?
Yes. Any range between about −9 quadrillion and +9 quadrillion works (JavaScript's safe-integer limit), and you can generate up to 10,000 numbers at once.
Is anything sent to a server?
No. Everything is generated by JavaScript in your browser, so nothing you type or generate is uploaded, logged or stored. It keeps working offline once the page has loaded.
Your business here? Sponsor this tool from $16/week. See placements