Random Number Generator

Generate random numbers within a custom range online for free, using secure randomness.

How to use

  1. 1Enter a minimum and maximum value.
  2. 2Choose how many numbers to generate.
  3. 3Click Generate and copy the results.

Features

  • Custom min/max range
  • Generate up to 1000 numbers
  • Optional unique (no repeat) values
  • Uses secure randomness

Supported formats

Output: whole numbers

Privacy

Numbers are generated locally in your browser and are never sent to our server.

About this tool

The Random Number Generator produces whole numbers within a range you choose, using crypto.getRandomValues with rejection sampling rather than a naive modulo operation — the naive approach can slightly favor some numbers over others depending on the range, which matters for anything resembling a fair draw. Useful for raffles, sampling, games, or any task that needs genuinely unbiased random numbers rather than a predictable pseudo-random sequence. For a random password instead of a number, see the Password Generator.

Frequently asked questions

How random are these numbers?

Numbers are generated using crypto.getRandomValues, your browser's cryptographically secure random number source, with rejection sampling to avoid bias.

Can I generate numbers without repeats?

Yes, enable 'Unique values' to generate numbers with no duplicates, up to the size of your chosen range.

What's the maximum count?

You can generate up to 1000 numbers per batch.

Why does rejection sampling matter — isn't modulo good enough?

Taking a random value modulo your range can slightly favor smaller numbers when the range doesn't divide evenly into the random source's size — a subtle bias that matters for anything resembling fairness. Rejection sampling discards and re-rolls any value that would introduce that bias, so every number in the range has exactly equal odds.