Skip to content
TabBench

Random Number Generator

Generate random numbers in any range: whole numbers or decimals, with or without repeats, sorted or as drawn. Presets for lottery picks, PINs and OTP-style codes.

Runs in your browser. Nothing you add is uploaded.

What the Random Number Generator does

Most online random number generators lean on Math.random(), which is fast but predictable and, in some engines, slightly uneven. This one uses your device's cryptographic random generator and an unbiased method of turning its output into a range, so every number in your range is exactly as likely as any other. Pick a range and a count, choose whole numbers or decimals, forbid repeats for draws, pad with zeros for PINs and sort the results. Presets cover the common jobs.

How to generate random numbers

  1. Choose a preset, or type the lowest and highest number you want.
  2. Set how many numbers to generate, up to 10,000.
  3. Turn on “No repeats” for draws where each number can appear only once, and choose decimal places if you want fractions.
  4. Choose the order and, for PINs and codes, pad with leading zeros to a fixed width.
  5. Press Generate, then copy the numbers with the separator you prefer.

The Random Number Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use it

Giveaways and raffles

Number the entries and draw a winning number. Use No repeats to draw several different winners.

Sampling and testing

Pick a random subset of rows, generate test data within a range, or choose unbiased sample sizes.

Games and decisions

Choose a number for a guessing game, pick a random page or chapter, or pick lottery-style sets with no repeats.

Good to know

  • For No repeats, the count cannot exceed the number of values in the range.
  • Random does not mean evenly spread: clusters and repeats are normal when repeats are allowed.
  • For passwords or tokens use the Password Generator, which offers the right character sets.
  • Decimal mode rounds to the places you choose; the limits are included.
  • Use “As drawn” to see the order the numbers came out in.

Frequently asked questions

Are these numbers truly random?

They come from your device's cryptographic random generator, which is seeded from hardware and operating-system entropy. That is the same source used to create encryption keys, and it is far better than the Math.random() most simple generators use.

Can I use it to pick lottery numbers?

Yes: choose the range, ask for the count and turn on No repeats. It cannot improve your odds, because every combination is equally likely, but it does avoid the human habit of choosing birthdays.

Is it safe for generating a PIN?

Yes for a one-off PIN or code, since the numbers are cryptographically random and nothing is sent anywhere. For passwords use the Password Generator instead.

What is modulo bias?

A common shortcut to fit a random value into a range is to take it modulo the range. When the range does not divide evenly into the generator's output, some numbers come up slightly more often. This tool discards the few draws that would cause that, so the result is exactly uniform.

Can this tool predict or favour numbers?

No. Each result is a fresh draw from the operating system's secure generator, and nothing about previous draws influences the next.

Is there a limit on the range?

Whole numbers can be anywhere within ±9 quadrillion (the largest integers JavaScript stores exactly). You can ask for up to 10,000 numbers at once.