Generate cryptographically secure random numbers within any range. Single or multiple numbers at once.
Computers cannot generate truly random numbers. They use algorithms (pseudo-random number generators, or PRNGs) that produce sequences that appear random. This tool uses the browser's crypto.getRandomValues() which is cryptographically secure and suitable for most purposes.
For security-critical uses (cryptographic keys, tokens, OTPs), always use a cryptographically secure random source. JavaScript's Math.random() is NOT cryptographically secure. It is predictable. This tool uses window.crypto, which is.
A standard die (1–6) has a 1/6 ≈ 16.67% chance per outcome. Two dice (2–12) don't have equal probability. The number 7 is most likely (6/36 = 16.67%) and 2 or 12 least likely (1/36 ≈ 2.78%). Use this tool to simulate any die size.
UK National Lottery: pick 6 numbers from 1–59. Each combination has an equal 1 in 45,057,474 chance. Statistically, every combination is equally likely. Hot or due numbers are a gambler's fallacy. A random generator gives you exactly the same odds as any manual pick.
Need multiple unique random numbers? Generate one at a time and discard duplicates, or use a shuffle algorithm (Fisher-Yates) on a range. For truly independent picks (like dice rolls), repeats are allowed by design.
Random test data is useful but can make bugs hard to reproduce. Many testing frameworks seed their random number generators so tests produce the same output each run, ensuring reproducibility while still varying data across seed changes.
Generate cryptographically secure random numbers within any range. Set minimum and maximum values, choose how many to generate, and click Generate for a new result.
Simulating a six-sided die: min 1, max 6
A random integer between 1 and 6
UK National Lottery pick: 6 numbers from 1 to 59, no duplicates
6 unique random numbers between 1 and 59
Random percentage: min 1, max 100
A random integer between 1 and 100
This tool uses the browser's window.crypto.getRandomValues() API, which generates cryptographically secure random numbers — suitable for security-sensitive uses like token generation. Standard JavaScript Math.random() is a pseudo-random number generator and is NOT cryptographically secure; its output can be predicted if the internal seed is known.
The minimum and maximum values define the range available to the generator. Check the control labels to see whether the selected mode treats those limits as inclusive, then enter whole-number limits when you need an integer draw. Avoid swapping the bounds accidentally; a valid range must have a lower limit no greater than its upper limit.
It is convenient for classroom exercises, games, test data, and informal selections. Do not use a browser utility as the sole source of randomness for passwords, access codes, cryptographic keys, gambling, or regulated drawings. Those uses need a cryptographically secure generator and, for formal prizes, a documented process that participants can audit.
Generate one value at a time and record each result if repeats are acceptable. If you need a draw without replacement, generate a larger list and remove or reject duplicates, then document the method. For a fair group decision, agree on the range and the duplicate rule before generating any results.
List every eligible option once, agree on the range and duplicate rule, and generate only after the list is final. Keep a record of the inputs and results so another person can review the process. Remove duplicate names or weights only when the selection rules explicitly require it.