Random Number Generator
Generate cryptographically strong pseudo-random integers, decimals, or sequences within custom bounds.
Parameters & Inputs
Summary & Breakdown
Formatted Sequence
About the Random Number Generator
Random number generation is critical in statistical sampling, cryptographic security, sweepstakes drawings, and gaming.
Unlike primitive pseudorandom linear congruential generators that repeat predictable cycles, this generator utilizes the browser's native Web Cryptography API (`crypto.getRandomValues`) to draw hardware entropy.
Customize your lower and upper bounds, generate multiple picks simultaneously, enforce unique non-repeating selections, and sort results.
How the Calculations Work
Draws cryptographically strong 32-bit unsigned integers from hardware entropy pools, scales them to the requested interval [min, max], and applies rejection sampling to eliminate duplicates.
Scaled Integer = Min + floor((Random_Uint32 / 2^32) * (Max - Min + 1))
Variables & Definitions
- Min & Max: Inclusive bounds of the integer generation interval
- Count: Total random items generated in a single batch
- Rejection Sampling: Guarantees uniform mathematical distribution without modulo bias
Picking 5 unique numbers between 1 and 50: The generator draws cryptographically secure integers, rejects any values already present in the collection, and yields fair lottery selections.
Key Terms Explained
CSPRNG
Cryptographically Secure Pseudo-Random Number Generator€”resists reverse engineering even when output history is known.
Entropy
Unpredictability gathered from system hardware noise (keystroke timings, thermal variance, network jitter).
Modulo Bias
A statistical flaw occurring when naive modulo arithmetic over-represents lower numbers in an interval.
Fisher-Yates Shuffle
An unbiased algorithm for producing a random permutation of a finite set.
Practical Tips & Pitfalls to Avoid
Ensure range exceeds count for unique mode
If you request 10 unique numbers, your range must span at least 10 integers (e.g., 1 to 10).
Copy output directly
Use the Copy button to export lists for classroom lotteries, team assignments, or spreadsheets.
Use for lottery selections
Set Min=1, Max=69, Count=5 unique to simulate Powerball white ball drawings.
Inspect the average value
Over large sample sizes, the average converges closely to the midpoint: (Min + Max) / 2.
Frequently Asked Questions
Yes. It uses the Web Crypto API (crypto.getRandomValues) which harnesses hardware-level system entropy, making it suitable for security and fair contests.
No. When unique mode is enabled, every generated number in the batch is guaranteed distinct.
You can generate numbers anywhere between -1,000,000,000 and 1,000,000,000.
The generator automatically swaps the values to maintain a valid ascending mathematical interval.
Yes. Set Min=1, Max=6, Count=2 with duplicates allowed to simulate rolling two six-sided dice.