Skip to content
KazamTools

Random Number Generator

Fair random numbers in any range, with or without repeats.

Quick presets

1 to 10,000.

0 for whole numbers.

Sort the results

100 possible values; each has a 1 in 100 chance on every draw.

Your random number

—

Press Generate. Numbers come from your browser’s secure random generator.

Need something more visual? Spin the wheel spinner to pick a name, or roll real-looking dice with the dice roller.

How to use the Random Number Generator

  1. 1Enter the lowest and highest number you want (both are included).
  2. 2Choose how many numbers to pick and, if you need them, decimal places.
  3. 3Tick No repeats for lottery-style draws, and pick a sort order.
  4. 4Press Generate, then copy the numbers. Recent draws stay in the history.

How this random number generator works

You give a lowest and a highest number. Both ends are included, so a range of 1 to 10 has ten possible results. Each time you press Generate, the tool asks your browser’s cryptographic random number generator (the Web Crypto function crypto.getRandomValues) for fresh random bits and turns them into numbers in your range.

Two details make the result fair:

  • A secure source. Many simple tools use Math.random(), which is fast but predictable if someone knows its internal state. The Web Crypto source is designed for passwords and encryption keys, so nobody can predict the next number.
  • No modulo bias. The usual shortcut, “random number mod 10”, slightly favours some results whenever the number of possible random values is not an exact multiple of 10. This tool throws away the few random values at the very top that would cause that tilt and draws again. Every number in your range has exactly the same chance.
chance of any one value = 1 ÷ (highest − lowest + 1)

For 1 to 100 that is 1 in 100 on every draw, no matter what came before. Random numbers have no memory: a 7 last time does not make a 7 less likely now.

Repeats or no repeats?

By default, each number is drawn independently, so the same value can appear twice. That is right for things like dice rolls or test data.

Tick No repeats when each value should appear at most once, like balls drawn from a lottery machine or raffle tickets pulled from a hat. The tool uses a shuffle method (a partial Fisher–Yates shuffle), so every possible set of numbers is equally likely. You cannot ask for more unique numbers than the range holds; 11 unique numbers from 1 to 10 is impossible, and the tool tells you so.

Example: a 6 from 49 lottery line. Set 1 to 49, ask for 6 numbers, tick No repeats and sort low to high. There are 13,983,816 possible lines, and each one is equally likely.

Draw Range Count Repeats Possible outcomes
Pick a winner from 250 entries 1–250 1 n/a 250
Lottery line 1–49 6 No 13,983,816 (any order)
Four-digit PIN 0–9 4 Yes 10,000
Coin flip (0 = heads) 0–1 1 n/a 2

Random decimals

Set decimal places to get numbers like 0.372 or 18.45. With 2 decimal places, the range 0 to 1 holds 101 values: 0.00, 0.01, and so on up to 1.00. The tool picks one of those evenly, so 0.00 and 1.00 are just as likely as 0.50. Behind the scenes it works with whole numbers (0 to 100) and only adds the decimal point at the end, so you never see floating-point noise like 0.30000000000000004.

If your lowest and highest values have more decimals than you asked for, the range is trimmed to the values that fit. For example, 0.25 to 0.75 with 1 decimal place gives 0.3 to 0.7.

Ideas for using it

  • Classroom and games: pick a student, a question number or a team order. For names instead of numbers, the wheel spinner lets you type a list.
  • Giveaways: number the entries and draw one. Screenshot the result or record your screen if you need to prove the draw was fair.
  • Board games and role-playing: if you need dice notation like 3d6+2, the dice roller is built for that.
  • Testing and sampling: generate up to 10,000 numbers at once, sorted or as drawn, and copy them with commas, spaces or one per line.
  • Security: for passwords, use the password generator rather than stringing random numbers together, because it mixes letters, digits and symbols for far more strength per character.

Is it truly random?

Computers generate randomness from physical noise collected by the operating system (such as timing jitter in hardware), then stretch it with a cryptographically secure algorithm. The result passes every practical statistical test and cannot be predicted, which is what “random” means for games, draws and sampling.

Regulated lotteries and legal prize draws often have their own rules and audited equipment, so check those rules before using any website for an official draw. Nothing you generate is saved or sent anywhere; the short history list exists only on this page and disappears when you close it.

Cite this tool

Using this tool in an essay, report or article? Copy a ready-made reference. Check your teacher's or publisher's style guide for small differences.

APA
KazamTools. (2026, October 22). Random number generator. Retrieved October 30, 2026, from https://kazamtools.com/generators/random-number-generator/
MLA
"Random Number Generator." KazamTools, 22 Oct. 2026, https://kazamtools.com/generators/random-number-generator/. Accessed 30 Oct. 2026.
Chicago
KazamTools. "Random Number Generator." Last modified October 22, 2026. Accessed October 30, 2026. https://kazamtools.com/generators/random-number-generator/.
Plain link
Random Number Generator (KazamTools): https://kazamtools.com/generators/random-number-generator/
HTML link
<a href="https://kazamtools.com/generators/random-number-generator/">Random number generator</a> by KazamTools

Frequently asked questions

Are these numbers really random?

They come from your browser’s cryptographic random number generator (crypto.getRandomValues), the same source used for passwords and encryption keys. Rejection sampling removes modulo bias, so every number in the range is equally likely.

Are the minimum and maximum included?

Yes. A range of 1 to 10 can return 1, 10 or anything in between, and each of the ten numbers has exactly a 1 in 10 chance.

How do I generate numbers without repeats?

Tick "No repeats". Each number can then appear only once, like balls drawn from a lottery machine. You cannot ask for more unique numbers than the range holds, for example 11 unique numbers from 1 to 10.

Can I use this for a lottery or a prize draw?

You can use it to pick numbers for fun or for an informal giveaway. Official lotteries and regulated prize draws have their own audited equipment and rules, so check those before relying on any website.

Is anything saved or sent anywhere?

No. The numbers are made in your browser and the history lives only on this page until you close or refresh it.

Was this tool helpful?