Free online tool

Random Number Generator

Generate random integers in any range, with or without duplicates. Cryptographically random and 100% offline.

When you need a random number

Random numbers show up everywhere: picking a raffle winner, choosing a test sample, seeding a game, deciding a coin flip, or just settling a small argument fairly. This generator gives you full control over the range, count and whether repeats are allowed — no more scribbling on paper or trusting an app you don't know.

Is it truly random?

The generator uses the browser's crypto.getRandomValues, which is a cryptographically secure pseudo-random number generator. For everyday purposes — draws, sampling, testing — the output is statistically indistinguishable from true randomness and vastly better than the default Math.random.

+Can I use this for a public giveaway?

Yes. Take a screenshot of your inputs and the generated numbers as a record. For high-stakes draws, consider using a verifiable random source that participants can audit.

+Why is there a limit of 1000 numbers?

That's just a UI cap to keep things snappy. If you need larger batches, contact us and we can raise it.

Generating numbers that are actually unpredictable

Picking a random integer between two bounds sounds trivial until you need it to be unbiased across the full range, avoid duplicates when required, and come from a source that isn't secretly predictable.

The naive version of this problem is one line of code, but the naive version also hides at least two subtle bugs — biased distributions and duplicate collisions — that only show up once you run enough trials to notice the pattern, which is exactly the kind of thing worth getting right in a shared tool rather than re-deriving every time.

The modulo bias problem

A naive way to constrain a random value to a range is random() % range, but this skews results when the range doesn't evenly divide the generator's output space, over-representing the low end of the range ever so slightly. It's a small effect for casual use like rolling dice for a game, but it matters for anything statistical, like generating a fair sample for a lottery draw or an A/B test bucket assignment, where a well-built generator rejects out-of-range draws and retries rather than taking the biased shortcut.

Unique draws change the math entirely

Generating numbers without replacement, such as picking 6 unique numbers from 1 to 49 for a lottery-style draw, isn't the same operation as independently generating 6 numbers and hoping none collide — the latter gets exponentially likely to produce duplicates as the draw count approaches the range size, so a proper no-duplicates mode tracks what's already been picked and excludes it from subsequent draws.

A gotcha to watch for

If you're using generated numbers for anything security-adjacent, like a one-time PIN or a raffle with money on the line, confirm the tool uses a cryptographically secure random source rather than Math.random, since the latter is fine for shuffling a playlist but not for anything where predictability could be exploited. Seeded random number generators are a separate category entirely, deliberately deterministic so the same seed reproduces the same sequence, which is useful for reproducible test fixtures or procedurally generated content but is the opposite of what you want whenever unpredictability is the actual requirement.

Floating point ranges bring their own rounding issues

Generating a random decimal between two bounds instead of an integer introduces floating-point rounding at the edges, and naively scaling a 0-to-1 random value by a range and adding an offset can very rarely produce a value equal to the upper bound due to rounding, which matters if downstream code assumes the range is strictly exclusive on that end. Tools that need exact boundary behavior should document whether bounds are inclusive or exclusive rather than leaving it to be discovered through a boundary bug.

People also search for

  • random number generator online
  • random integer generator
  • lottery number picker
  • random number no duplicates
  • true random number generator
  • dice roll simulator
  • random number between range
  • secure random number generator