Random Number Generator
Generate random numbers, lists, dice rolls, coin flips, and random items from a custom list. Cryptographically random.
True Randomness vs. Pseudo-Randomness
This generator uses the Web Crypto API (crypto.getRandomValues()) — a cryptographically secure pseudo-random number generator (CSPRNG). This is the same technology used in password generation and cryptographic applications, producing numbers that are statistically indistinguishable from true randomness for all practical purposes.
Standard random functions in most programming languages (like Math.random()) use a much simpler pseudo-random algorithm that produces predictable sequences — unsuitable for security or fair sampling. CSPRNGs solve this by using entropy from hardware sources.
Common Uses for Random Number Generators
- Games and contests: Selecting winners, rolling dice, randomising game elements
- Statistics and research: Random sampling from a population
- Decision making: Breaking ties, random assignment of tasks or shifts
- Education: Creating random test questions or exam seating arrangements
- Coding and testing: Generating test data
- Passwords: Generating secure random PIN numbers (not full passwords — use a dedicated password generator for that)
Dice Probability Reference
- D6 (standard die): Each face has 1/6 (≈16.7%) probability
- D20 (RPG die): Each number has 5% probability — critical hit (20) is 5% chance
- Two D6 sum: Most likely sum is 7 (6/36 = 16.7%), least likely are 2 and 12 (1/36 = 2.8% each)