Random Number Generator
A random number generator draws inclusive integers from a minimum through a maximum using crypto.getRandomValues with rejection sampling so the result is not biased by modulo. Optional unique draws and ascending sort. Browser CSPRNG, not a hardware entropy lab.
Inclusive lower bound. Whole numbers only.
Inclusive upper bound. Example: 1 to 6 can roll a 6.
Without replacement. Count cannot exceed the size of the range.
How to use the random number generator
- Set the inclusive minimum and maximum (whole numbers).
- Set how many numbers to draw (1 to 1000).
- Leave Unique on for sampling without replacement, or turn it off to allow repeats.
- Optionally sort ascending, then Generate. Nothing is uploaded.
Random Number Generator
Unbiased integers from Web Crypto
| Source | crypto.getRandomValues |
|---|---|
| Bias control | Rejection sampling, not value % n |
| Range | Inclusive min through max |
| Unique | Draw without replacement when checked |
| Count | 1 to 1000 |
| Not | Math.random, lottery authority, or lab TRNG |
What the random number generator does
The random number generator produces uniform integers from minimum through maximum inclusive. Every integer in that closed interval is equally likely. Draws use the browser Web Crypto API with rejection sampling, not Math.random. Count may be up to 1000. Unique draws cannot exceed the size of the range (max - min + 1).
Web Crypto versus Math.random
Browsers expose Math.random for casual animation timing and crypto.getRandomValues for a CSPRNG backed by the OS entropy pool. This page uses the latter. Mapping raw bits onto an arbitrary range with n % range can slightly favor smaller remainders; rejection sampling discards biased draws so each integer stays equally likely.
With and without replacement
Unique is on by default: a sample without replacement, like drawing raffle tickets. Turn unique off to allow repeats (like rolling the same die many times). For names instead of numbers, use the list picker or spin the wheel.
Not a lottery or crypto key
This is a fair integer generator for lists, games, and classroom draws. It is not a national lottery draw and not a way to mint encryption keys. Passwords have their own page: password generator.
Limits
Integers only (no floating point on this form). Minimum and maximum must be safe whole numbers. Unique count cannot exceed the range size. CZNull does not receive the draws.