Random number generator
Generate random whole numbers in a range, with or without repeats.
Runs in your browser. Your input is not uploaded.
What it does
The generator draws integers from the browser’s cryptographically secure random source (crypto.getRandomValues) with rejection sampling, so every number in the range is equally likely.
Without duplicates, numbers are drawn like cards from a shuffled deck, so you get as many distinct values as you ask for.
How to use it
- Set the minimum, maximum and how many.
- Choose whether numbers may repeat and whether to sort them.
- Generate and copy.
Things to watch for
- Asking for more unique numbers than the range holds is an error. 1–10 has only ten.
- Results cannot be reproduced from a seed. For a public draw, publish the method and record the result.
Questions
- Are the numbers truly random?
- They come from your operating system’s secure random generator via the browser. That is suitable for draws and passwords.
- Can I pick a random winner?
- Number your entries, then generate one number from 1 to the number of entries.
- What is the largest range?
- Any safe JavaScript integer, up to about ±9 quadrillion.
- Can I generate decimals?
- Not directly. Generate integers and divide, for example 0–10000 divided by 100 for two decimal places.