Random Number Generator
Pick a minimum and maximum, say how many numbers you want and generate them instantly. The tool can produce whole numbers or decimals with a fixed number of places, guarantee that no value repeats, sort the results, and handle ranges far larger than JavaScript's normal safe integer limit using BigInt. By default it draws from the browser's cryptographic generator with rejection sampling, so every value in the range is equally likely.
Generate Random Numbers
Random numbers
Summary
How to Use the Random Number Generator
- Enter the minimum and maximum (both are included).
- Choose how many numbers, whether they are integers or decimals, and whether they must be unique.
- Press Generate.
- Copy the result, choosing the separator and sort order first if you need them.
About This Tool
Teachers and game hosts picking numbers, developers who need test data, people running raffles or draws, and anyone who needs a fair random choice from a range.
Input: Minimum, maximum, count · Output: List of numbers.
Features and Limitations
Features
- Integers or decimals with 1–12 places, from 1 to 10,000 numbers per click.
- Unique mode with a clear error when the range has fewer values than you asked for.
- Unbiased selection by rejection sampling; BigInt for ranges beyond 2^53.
- Sort ascending or descending and choose the separator.
- Summary shows count, smallest, largest and sum.
Limitations
- Decimals are chosen uniformly from the grid of values with the chosen number of places, not from every possible real number.
- Minimum and maximum must be written as plain numbers (no commas or exponent notation).
- For a legally binding lottery or a draw that needs an audit trail, use an independently verifiable process; this tool keeps no record.
- With “secure” unticked the tool uses Math.random, which is fast but not cryptographically secure.
- Results are computed in your browser; nothing you enter is sent to a server.
Example
Minimum 1, maximum 49, count 6, unique ticked gives six different numbers from 1 to 49, for example 7, 12, 23, 31, 38, 44, in the order drawn or sorted if you choose.
Frequently Asked Questions
Are the numbers truly random?
They come from your browser's cryptographically secure generator, which is unpredictable for practical purposes. It is a pseudo-random generator seeded by the operating system, not a physical random source.
What is rejection sampling and why does it matter?
Reducing a random value with a simple remainder (modulo) makes some results slightly more likely when the range does not divide evenly. Rejection sampling discards the values that would cause this, so every number has exactly the same chance.
Why do I get an error for unique numbers?
You asked for more distinct numbers than exist in the range, for example 10 unique integers between 1 and 5. Widen the range, use decimals or ask for fewer numbers.
Can I use it for a giveaway?
For informal draws yes. For prizes with legal rules, check local requirements; you may need a documented, independently witnessed method.
How large can the range be?
Very large: integers are handled with BigInt, so numbers with hundreds of digits work. Only the count (10,000) and decimal places (12) are limited.
Related Tools
More like this: all Random & Generators tools, all Productivity tools or the TinySandy home page.