Skip to content
Categories
Random Number Generator
Generate random numbers within a specified range and conditions.
Overview
- Generates multiple random numbers matching specified conditions: minimum, maximum, and count.
- Supports switching between integers and decimals, allowing or disallowing duplicates, and switching between standard randomness (Math.random) and cryptographically secure randomness (Web Crypto API).
- Useful for a wide range of purposes, from lotteries that require unpredictability to everyday uses like generating test data.
Usage
- Enter the minimum value, maximum value, and count.
- Choose whether to generate integers or decimals, whether to allow duplicates, and whether to use cryptographic randomness.
- Click the "Generate" button to display a list of random numbers matching the conditions.
Example
Input
Min: 1, Max: 10, Count: 5, Integers only
Output
3 7 1 9 5
Use Cases
- Fairly generating winning numbers for a lottery or drawing using cryptographic randomness
- Generating dummy numeric values (age, price, score, etc.) for test data within a specified range
- Generating random numbers for a game or simulation, with duplicates allowed or disallowed
FAQ
When should I turn on "Use cryptographic randomness"?
Turn it on for use cases that require unpredictability, such as lotteries or token generation. Standard randomness (Math.random) is fine for uses that don't need resistance to prediction, such as games or sample data generation.
Is there a limit to the count when duplicates aren't allowed?
In integer mode, you cannot generate more values than the number of integers contained in the specified range — doing so results in an error.
Are the generated numbers sent anywhere?
No. Everything is generated in your browser and nothing is sent to an external server.
Notes
- Enable "Use cryptographic randomness" for uses that require unpredictability, such as lotteries or token generation. It's fine to leave it off for everyday uses.
- In integer mode without duplicates, you cannot generate more values than the number of integers in the specified range — doing so results in an error.
- The generated result exists only on the page and is lost on reload, so copy and save it if you need to keep it.
Related Tools
Generate multiple passwords by specifying character types and length.
Generate sortable unique identifiers (ULIDs).
Generate multiple random strings by specifying character types and length.