Web Crypto random numbers

Random Number secure random number generator

Generate whole numbers, decimals or non-repeating numbers, and quickly switch between dice, lotto and percentage scenarios.

special mode

Numeric range
0number of results
0Unrepeated quantity

Random results

Download results

Web Crypto random numbers and uniform distribution

Commonly used for general interface special effects Math.random(), but it's not designed for unpredictability. This tool uses crypto.getRandomValues() Obtain cryptographically secure random numbers; integer mode then uses rejection sampling to avoid direct modulo making certain numbers appear slightly more often.

Decimal mode will map safe random numbers to the specified range and then round them to the selected number of digits. When "Allow Duplicates" is turned off, the tool will continue to extract and remove duplicates, and will also first check whether there are enough different values ​​at the current precision. This is suitable for test data, random sorting, game prototypes and general draws; formal draws involving bonuses, regulations or public audits should still use dedicated processes with verifiable records.

Three quick modes

  • Dice: A single integer from 1 to 6.
  • Lotto: Take 6 non-repeating integers from 1 to 49 and sort them.
  • Percentage: 0 to 100, rounded to two decimal places.

Frequently Asked Questions

Do you use Math.random()?
No, both generation and shuffling use the Web Crypto API.
Why might non-repeating patterns fail?
The condition cannot be met when the number of requests exceeds the total number of distinct values that the specified range and precision can provide.
Are decimal results really even?
The tool first uniformly maps and then quantizes; the distribution is good for general purposes, but extreme scientific simulations should use a dedicated statistical library.
Can it be used in official draws?
Technically, there is a safe source of random numbers, but a formal lottery still requires rules, records, third-party audits, and local regulations.
Will sorting regenerate numbers?
No, sorting only changes the order of the existing results; safe shuffling only rearranges them.