Random Number Generator
Random numbers power everything from games and simulations to cryptography and statistical sampling. Our generator produces truly random integers, floats, and sequences using cryptographically secure randomness (CSPRNG via the Web Crypto API), with options for unique sequences, weighted randomness, and Gaussian (normal) distribution.
Results
Last Generated
Click Generate to get numbers
Common Use Cases
About the Random Number Generator
Random numbers power everything from games and simulations to cryptography and statistical sampling. Our generator produces truly random integers, floats, and sequences using cryptographically secure randomness (CSPRNG via the Web Crypto API), with options for unique sequences, weighted randomness, and Gaussian (normal) distribution.
How to use it
- Set your range (min and max values) and how many numbers to generate.
- Toggle unique mode to generate a non-repeating sequence (like lottery numbers).
- Choose distribution: uniform (default), Gaussian (normal), or weighted.
- See generated numbers with statistical analysis (mean, min, max, std dev).
Formula & methodology
Uniform integer: Math.floor(crypto.getRandomValues(new Uint32Array(1))[0] / 2^32 × (max − min + 1)) + min. Gaussian: Box-Muller transform on two uniform randoms: Z = sqrt(-2 × ln(U1)) × cos(2π × U2). Uniform float [0,1): getRandomValues byte / 256, chained for precision. CSPRNG vs Math.random(): crypto API is unpredictable; Math.random() is deterministic given seed.
Common use cases
- Lottery and raffle: picking winners from a list
- Game development: dice rolls, card shuffles, procedural generation
- Statistical sampling: selecting random survey participants
- Security: generating tokens, nonces, and one-time codes
- A/B testing: random assignment of users to experiment groups
Frequently asked questions
Related tools
All Tools →Embed this tool on your site
Free for personal and commercial use. Just copy the snippet below.