Random Number Generator — One Number or a Unique Sample
Generate one number from a clearly labelled inclusive range, or create, sort, copy and download a larger random sample.
Random number workspace
Choose an inclusive range and get one random number. Increase the quantity only when you need a sample.
Sample distribution
Run history
| Run | Source | Values |
|---|
Random integer generator
Whole-number mode includes both endpoints. Browser-crypto integers use rejection sampling so a range that does not divide the 32-bit source evenly does not give extra probability to low values.
Unique random numbers
Select No duplicates to sample without replacement. The requested count cannot exceed the number of integers in the inclusive range.
Seeded random numbers
A text seed creates a repeatable pseudorandom sequence for examples, tests, classroom work, or fair replay. It is intentionally reproducible and is not cryptographically secure.
What browser crypto means
MDN describes crypto.getRandomValues() as cryptographically strong pseudorandom output seeded with sufficient entropy. It is not a claim of physical or quantum true randomness.
Frequently asked questions
Are minimum and maximum included?
Both are included for whole numbers. Decimal mode samples from the minimum up to the maximum and rounds to the selected precision.
Why can unique sampling fail?
You cannot request more distinct integers than exist in the selected inclusive range.
Will a seed always repeat the result?
Yes on this page when the seed and all generation settings remain the same.
Can I use this to create passwords or encryption keys?
No. Use a dedicated, audited security tool and the appropriate Web Crypto key-generation APIs.