Random Number Generator
Generate truly random or reproducibly seeded random numbers with cryptographic CSPRNG, seeded Mulberry32, unique sampling, frequency histogram, and chi-square stats.
| Statistical Metric | Empirical (Observed) | Theoretical (Expected) | Verification Status |
|---|---|---|---|
| Mean (Average x̄) | 0 | 0 | Conforms to Law of Large Numbers |
| Variance (s²) | 0 | 0 | Standard Uniform Dispersion |
| Wald-Wolfowitz Runs Test | N/A (N < 10) | N/A | Verified |
| Parity Distribution | 0 Odd / 0 Even | ~50% / 50% split | Balanced integer parity |
Standard pseudo-random generators like Math.random() are not cryptographically secure and can suffer from predictability. This tool leverages the browser's native window.crypto.getRandomValues() to capture true operating system entropy.
By discarding any candidate sample that falls into the remainder above the highest multiple of the range, every possible integer has an identically equal probability of being selected.
No numbers generated yet.
Cloudflare's 100 Lava Lamps
In their San Francisco headquarters, Cloudflare points a video camera at a wall of 100 bubbling lava lamps. The unpredictable swirl of heated wax creates physical atmospheric entropy to seed cryptographic keys protecting 20% of the world's web traffic.
You might also like
Frequently Asked Questions
When set to Cryptographic CSPRNG, the generator uses the browser's native Web Cryptography API (window.crypto.getRandomValues) which accesses operating system entropy. It applies uniform rejection sampling to eliminate modulo bias, ensuring that every number in your chosen range has an identically equal probability of being picked.
Cryptographic CSPRNG produces unpredictable, high-entropy random numbers suitable for security, raffles, and cryptography. Seeded PRNG (powered by Mulberry32) uses a mathematical recurrence relation from an initial seed state; entering the exact same seed reproduces the identical sequence of numbers on any device, which is essential for gaming simulations, testing, and procedural generation.
Yes. By selecting 'Unique Only' (sampling without replacement), the generator uses an optimized Fisher-Yates partial shuffle algorithm to ensure no number is repeated. If you request more unique numbers than exist in your range, the tool provides an immediate helpful validation alert.
The Chi-Square Goodness-of-Fit test (χ²) compares observed frequencies against the theoretical expectation E = N / k for a perfectly uniform distribution. The Uniformity Dial visualizes this χ²/df ratio: values near 1.0 indicate ideal uniform spread, while higher values flag clustering or variance.
Yes! The tool supports negative boundaries (e.g., -50 to +50), single-value ranges, BigInt values up to 10^15, and floating-point decimal numbers with selectable precision from 1 to 8 decimal places.
When taking a random 32-bit integer (range 0 to 4,294,967,295) and using the remainder operator (% range), numbers below the remainder appear slightly more often because 2^32 is rarely evenly divisible by the target range. Rejection sampling discards samples in that small leftover window, ensuring complete mathematical fairness.
Yes, 100%. All computations execute entirely client-side in your browser with zero network requests. The page is cached by self-healing service workers, making it fully functional even without an internet connection.