Random number generator

Random numbers in any range — with or without repeats.
Dice, lottery and a four-digit code in one click.

Random number generator

Random whole numbers in a range you set: one or many at once, with or without repeats, sorted or as drawn. Ready options — a die, a 6-of-49 lottery, a four-digit code.

Ready options

Numbers are created in your browser by a cryptographic generator — every number in the range is equally likely.

Fair chance

Numbers come from the browser's cryptographic generator — the same one used for passwords and encryption keys. Every number in the range is equally likely: the generator discards the “extra” values that would make plain remainder division favour small numbers. In no-repeats mode numbers are chosen like balls drawn from a lottery drum.

How to use it

  1. Set the range “from” and “to” — negative numbers work too — and how many numbers you need.
  2. Tick “No repeats” for a lottery or choosing numbers, and “Sort ascending” to make the result easy to check.
  3. Or press a ready option: a die, two dice, D20, 6 of 49, 5 of 36, four digits.
  4. Copy the result. Below it are the time and settings — handy for a screenshot if you need to show how a draw went.

Related tools

To pick a winner by name rather than by number, split people into teams or flip a coin, open the random picker. For a PIN that cannot be guessed from a birth date there is the PIN generator.

Frequently asked questions

Are the numbers really random?

Yes, as far as a computer allows: it uses crypto.getRandomValues, a cryptographic generator the browser gets from the operating system. The next number cannot be predicted from the previous ones, and all numbers in the range are equally likely.

Can I use it for a giveaway?

For a friendly or small giveaway, yes: record the screen or take a screenshot with the time and settings under the result. For giveaways with valuable prizes and official rules the organizer should describe the way of choosing the winner in advance and show it to participants.

Why does seven come up more often with two dice?

Each die is fair, but six combinations give a sum of 7 and only one gives 2. So the sum of two dice is not evenly distributed. If you need one equally likely number from 2 to 12, set that range directly.

More tools

Utilities

Random picker
Winner, teams, order and a coin
Cron
Explain cron and OnCalendar, next runs
chmod
Permissions: 755 ↔ rwxr-xr-x, umask
Converters
Unix time, Base64, hex, URL and Punycode
JWT
Decode a token and check its signature
Checksums
SHA-256, SHA-512, MD5 of files locally
Photo metadata
GPS, camera and AI data: view and remove
JSON and YAML
Validate, format, convert