Generators & Utilities

Random Number Generator

Pick random numbers within any range you set, generate one number or a thousand at once, and choose whether repeats are allowed. Every draw comes from your browser's cryptographically secure random source, so the results are genuinely fair. A built-in dice mode rolls d4 through d20 and keeps a running total, making this useful for games, giveaways, sampling, and statistics homework alike.

Numbers come from your browser's cryptographically secure random generator (crypto.getRandomValues) — fair, unbiased, and never sent anywhere.

How the numbers are generated

Each number is produced with crypto.getRandomValues, the browser's cryptographically secure pseudo-random number generator. Crucially, the tool uses rejection sampling rather than a simple modulo operation. A naive random % range subtly favors the lower numbers whenever the range does not divide evenly into the generator's output space; rejection sampling discards the biased tail and redraws, guaranteeing every value in your range is exactly equally likely. For casual use the difference is invisible, but for sampling, simulations, or anything you might publish, that fairness matters.

Ranges, counts, and no-repeat mode

Set any minimum and maximum — negative numbers are fine, and the tool automatically swaps them if you enter them backwards. Request between one and a thousand numbers per draw. Enable no repeats to get unique values, which is exactly what you need for a raffle or for drawing lottery-style numbers; the tool will warn you if you ask for more unique numbers than the range can supply. Turn on sorting to see the results ordered from low to high, handy when you are checking coverage or looking for gaps.

Built-in statistics

Whenever you generate more than one number, the tool reports the sum, average, minimum, and maximum of the batch. That turns a simple generator into a quick teaching aid: generate a hundred numbers between 1 and 6 and watch the average converge toward 3.5, a hands-on demonstration of the law of large numbers. It is also useful for load testing, seeding spreadsheets, or generating sample data sets without opening a spreadsheet program.

Dice mode for games

The dice roller covers the standard polyhedral set — d4, d6, d8, d10, d12, and d20 — used in tabletop role-playing games and board games. Each roll is logged with a running total for the session, so you can add up an attack roll plus modifiers or track cumulative scores without a physical die. Because the rolls use the same cryptographic engine, they are as fair as any real die and far harder to fudge.

Privacy and fairness

Everything runs entirely in your browser. No number, roll, or setting is sent to a server or stored, which means nobody — including us — can predict or influence your results. For giveaways and contests that need to be demonstrably fair, a client-side generator you can inspect is more trustworthy than a black-box server. Refresh the page and every result is gone for good.

FAQ

Is this generator truly random?

It uses crypto.getRandomValues, a cryptographically secure random source, with rejection sampling to remove modulo bias. That makes every number in your range equally likely.

Can I generate numbers without repeats?

Yes. Turn on the no-repeats option and every number in the batch will be unique. The tool warns you if you request more unique numbers than the range allows.

How many numbers can I generate at once?

Up to one thousand per draw. When you generate more than one, the tool also shows the sum, average, minimum, and maximum.

Is the dice roller fair?

Yes. Every roll uses the same cryptographic random engine, so a d20 here is exactly as fair as a well-made physical die, with none of the bias real dice can have.

Can I use this for a raffle or giveaway?

Absolutely. Set the range to match your entry numbers, enable no-repeats, and draw your winners. Because it runs locally and fairly, it is well suited to contests.

More free tools