Developer Tools
Generate one or many random whole numbers or fixed-precision decimals with the browser's secure Web Crypto source. Control the range, duplicates and sorting, then copy the results without storing them.
Simple workflow
How to use Random Number Generator
- 1Choose Whole numbers or Decimal numbers, then enter the range and Quantity.
- 2For whole numbers, choose whether duplicates are allowed. Choose a sort order if needed.
- 3Select Generate numbers, then copy all results or generate a fresh set.
Good to know
Frequently asked questions
What makes the generation cryptographically secure?
The tool reads randomness from crypto.getRandomValues and maps it to the requested range with rejection sampling, avoiding the modulo bias caused by a simple remainder operation.
How are unique random integers selected?
With duplicates disabled, the tool samples without replacement in a bounded number of steps. Quantity cannot exceed the number of integers in the selected range.
Are decimal results uniformly random real numbers?
No tool can sample infinitely precise real numbers. This mode samples uniformly from the finite displayed values at the selected precision, up to 10 decimal places.
Should I use these numbers as passwords or encryption keys?
Use the dedicated Password Generator for passwords. This page is intended for random numeric choices, samples and test data, not for constructing authentication secrets.
Practical guide
Generate bounded random numbers without modulo bias
The browser’s crypto.getRandomValues API supplies secure random bits. UtilSprout uses rejection sampling to map those bits into the chosen range without the bias that a simple remainder operation can introduce.
Whole-number mode supports duplicates or bounded sampling without replacement. Decimal mode samples from the finite set of values available at the selected number of decimal places; it does not claim to sample infinitely precise real numbers.
Worked example
Draw ten unique integers
- Start with
- Minimum 1, maximum 100 and quantity 10.
- Choose
- Choose Whole numbers, turn off Allow duplicates and select Generate numbers.
- You get
- Ten distinct integers appear, all between 1 and 100 inclusive.
Tips for a useful result
- Turn off duplicates only when quantity does not exceed the size of the range.
- Sorting changes display order after generation; it does not change the random selection.
- Use Password Generator for passwords instead of assembling secrets from random numbers.
Supported ranges and privacy
Whole-number bounds must be JavaScript safe integers, from −9,007,199,254,740,991 through 9,007,199,254,740,991. Quantity is limited to 1,000. Decimal precision is limited to 10 places and represents discrete displayed values.
Settings and generated values remain in this page. They are not stored, included in a URL or sent to analytics.
Keep going