About This Random Number Generator
This tool uses the crypto.getRandomValues() API — a cryptographically secure random number generator built into modern browsers. Unlike simple Math.random(), it produces numbers that are statistically indistinguishable from true randomness, making it suitable for games, statistical sampling, cryptographic purposes, and fair lotteries.
Common Uses for Random Numbers
- Games: Dice rolls, lottery draws, card shuffling, coin flips
- Statistics: Random sampling, simulation, Monte Carlo methods
- Education: Generating practice problems with random values
- Decisions: Randomly selecting a winner, assigning groups, picking restaurants
- Security: Generating random seeds, one-time tokens, nonces
True Random vs. Pseudo-Random
Most programming languages use pseudo-random number generators (PRNGs) that produce deterministic sequences seeded by a value. A cryptographic RNG like the Web Crypto API collects entropy from hardware events to produce non-deterministic output, making it suitable for security-sensitive applications.