FernTool

Random number generator

Pick a random number in any range, flip a coin or roll dice. Fair, instant and made on your own device.




 

–

Quick: 1–10 · 1–100 · 1–1000 · Lotto 6 from 49 · 4-digit PIN

Flip a coin

–

Roll dice

dice with

–

How to use the random number generator

Type the smallest and largest number you want; both ends are included. Press Generate for one number, or set How many numbers to get a list of up to 1,000. Tick No repeats when every number must be different, which is what you want for raffles, lucky draws, picking winners from a numbered list or choosing lottery numbers.

Some ideas: pick a winner from 250 entries (1 to 250), choose who goes first (1 to the number of players), make a 4-digit PIN (1000 to 9999), or split a class into random teams by giving each person a number.

Why fair randomness matters

Many quick generators use a shortcut that makes some numbers slightly more likely than others. Here every number is drawn with a cryptographic random source and a method called rejection sampling, so each value in your range has exactly the same chance. Results can’t be predicted, and because they are made in your browser, nobody can see or tamper with them.

For developers and AI agents: GET /api/random?min=1&max=49&count=6&unique=true&sort=asc returns JSON, and the MCP server has a random_number tool. Language models can’t produce real randomness on their own, so this gives them a fair draw. Need a random password instead? Use the password generator.

Frequently asked questions

Is this random number generator truly random?

It uses your browser’s cryptographic random generator (crypto.getRandomValues), the same source used to make encryption keys and passwords. Every number in the range is equally likely, and the tool avoids the “modulo bias” that makes some simple generators favour low numbers.

How do I pick a random number between 1 and 10?

Set the minimum to 1 and the maximum to 10 and press Generate. The minimum and maximum are both included, so 1 and 10 can come up.

Can I generate numbers without repeats, like for a lottery or raffle?

Yes. Tick “No repeats” and set how many numbers you need. For a 6-from-49 style draw, set 1 to 49, how many to 6, tick No repeats and sort them.

Is a coin flip here 50/50?

Yes. Heads and tails each have exactly a 1 in 2 chance on every flip, and earlier flips have no effect on the next one. A run of five heads in a row happens about once in every 32 tries of five flips.

Is anything I generate saved?

No. Numbers, coin flips and dice rolls are made in your browser and never sent anywhere, so nobody, including us, can see or change the result.

More free tools