π² Random Number Generator
Fair random integers in any range. Raffles, dice, draws, decisions.
Your random numbers
How to Use the Random Number Generator
Set the minimum and maximum (inclusive), how many numbers you want, and whether duplicates are allowed. Generate as many times as you like: each draw is independent.
Set min and max. Both endpoints are included in the draw.
Choose how many numbers, and allow or forbid duplicates.
Generate. Optionally sort the results for lottery-style tickets.
Fair Draws and Raffles
For a fair raffle, number entries sequentially with no gaps, draw with duplicates off, and generate once per prize. Announce the range and method before drawing; transparency is what makes a draw feel fair, not just the math. For classroom or team use, drawing live on screen beats announcing a number later. Screenshot the result if anyone might question it.
Dice, Coins, and Game Night
Quick mappings: d4 = 1-4, d6 = 1-6, d8 = 1-8, d10 = 0-9 or 1-10, d12 = 1-12, d20 = 1-20, d100 = 1-100. Coin flip: 1-2. Rock-paper-seed a turn order with 1-N, no duplicates. One subtlety: rolling "2d6" as a single 2-12 draw is not the same as two d6 dice: real 2d6 clusters around 7 (bell curve), while a uniform 2-12 draw makes 2 as likely as 7. For authentic odds, generate two separate d6 rolls.
How the Randomness Works
This tool uses crypto.getRandomValues(), the browser's cryptographically secure random source, which gathers entropy from the operating system. Values are mapped to your range without modulo bias, so every integer in [min, max] is equally likely. No-duplicate mode shuffles the range with Fisher-Yates and slices off the first N, which is the textbook fair method. Because generation happens on your device, results are private to you.
Frequently Asked Questions
How do I pick a random winner from a list?
Number your entries 1 to N, set min 1 and max N, quantity 1, and generate. The result is your winner. For transparency, screenshot the result or generate it live on a call. Use no-duplicate mode when drawing multiple winners.
Are these numbers truly random?
They come from your browser's cryptographic random number generator (crypto.getRandomValues), the same source used for security tokens. It is far better than the old Math.random() and is statistically uniform. Note: draws happen locally in your browser, so nobody else can audit a raffle from these alone.
Can I generate numbers without repeats?
Yes. Turn on "No duplicates" and set quantity up to the size of the range. The generator shuffles the full range and takes the first N, so every number appears at most once. Perfect for lottery-style draws and sampling.
How do I simulate dice rolls or coin flips?
A d6 is min 1, max 6, quantity 1. A coin flip is min 1, max 2 (call 1 heads, 2 tails) or use 0/1. For 2d6, set quantity 2 and add them yourself, or generate one number from 2 to 12 with a bell-curve note: true 2d6 is not uniform, so two separate d6 rolls are more accurate.
Can I use this for passwords or security?
For casual use like picking a PIN, yes. For real security (passwords, tokens, keys), use a dedicated password generator with a larger character set. Random integers alone have too little entropy per character for cryptographic secrets.