Random Number Generator — Cryptographically Secure with Statistics
What random number do you need?
Cryptographically Secure Random Numbers
Generate random numbers using window.crypto — suitable for lotteries, raffles, simulations, and decision-making. Configure range, count, and uniqueness, then press Generate.
Quick Presets
Results are for informational purposes only.
Related Calculators
Fraction Calculator
What is the fraction answer?
Mean / Median / Mode Calculator
What is the average, middle, and most common value?
Sample Size Calculator
How many people do you need to survey?
Standard Deviation Calculator
What is the spread of your data?
Matrix Calculator
What is the matrix result?
Grade Calculator
What grade do you need to pass?
Get this result by email
We'll send you this summary so you can revisit it anytime — useful when making a final decision.
🔒 We'll only send your result. No spam, no noise.
Generate one or many cryptographically secure random numbers within any range — with optional unique (no-repeat) mode, batch generation up to 1,000 numbers, and statistical analysis of your results. This generator uses the browser's Web Crypto API for randomness, making it appropriate for raffles, sampling, security applications, and any use case where true unpredictability matters. Standard JavaScript Math.random() is a pseudorandom generator — predictable under certain conditions and not suitable for security-sensitive applications. The statistics panel shows the mean, median, min, max, and distribution of your generated batch — useful for verifying the numbers are uniformly distributed and for educational purposes. Common use cases include: random sampling for surveys, raffle and lottery drawings, randomizing a list for blind testing, and classroom activities where unbiased selection matters. The unique (no-repeat) mode ensures no number appears twice in a batch — essential when duplicates would invalidate the result, such as assigning students to groups or selecting winners from a fixed pool.
- →Selecting random contest winners, raffle tickets, or prize draw participants fairly
- →Randomly assigning students to groups, seats, or presentation order without bias
- →Generating sample numbers for statistics homework or Monte Carlo simulations
- →Creating random data for software testing or database seeding
- →Picking a random number for games, tie-breakers, or decision-making
A teacher has 28 students and needs to randomly call on 5 for a quiz question without bias. She generates 5 unique random numbers from 1 to 28 with no-repeats enabled. Results: 7, 19, 3, 24, 11. Students at those positions on her class roster are called. The unique mode ensures no student is selected twice — fair, instant, and requiring no manual shuffling.
What makes this random number generator cryptographically secure?
This tool uses window.crypto.getRandomValues, part of the Web Crypto API built into all modern browsers. It draws from the operating system's entropy pool, which collects unpredictable physical events like CPU timing, hardware interrupts, and mouse movements. Standard Math.random() uses a deterministic algorithm seeded at startup — more predictable and not suitable for security purposes.
How does the unique (no-repeat) mode work?
In unique mode, each number is added to a set and only kept if it hasn't appeared before. The generator keeps drawing until it has the requested count of unique values. This is equivalent to drawing from a hat without replacement. Note: if you request more unique numbers than exist in the range (e.g., 10 unique numbers between 1 and 5), the request is capped at the range size.
Can I use this for a fair lottery or raffle?
Yes — the cryptographic randomness makes this appropriate for fair selection. For small raffles, generate unique numbers corresponding to ticket numbers and announce the results publicly. For larger or higher-stakes draws, consider whether the process needs to be independently audited or witnessed, which no online tool can substitute for.
What is the maximum number of random numbers I can generate at once?
The generator supports batches up to 1,000 numbers. For unique mode, the batch size is also capped by the size of your range. Generating large batches (100+) provides enough data to see the distribution statistics in the stats panel, which can be useful for verifying uniformity.
Why does the distribution look uneven for small batches?
Random processes produce uneven results in small samples — that's the nature of randomness. With 10 numbers between 1 and 100, you wouldn't expect uniform coverage. Distribution evenness improves with batch size: generate 500+ numbers and the histogram will look much more uniform. The statistical variance of a small batch is expected and not a bug.