Skip to content

Random number generator

Generate one random whole number or thousands at once, anywhere in the range you set, using your browser's cryptographically secure random number generator rather than the weaker Math.random(). Allow or forbid repeats, and sort the result if you need it ordered.

  • Nothing you type leaves this page
  • Works offline once loaded
  • Free forever, no signup

{{ output }}

How to use this tool

  1. Set the minimum and maximum

    The range is inclusive at both ends.

  2. Choose how many numbers you need

    And whether duplicates are allowed — turning them off draws unique numbers only.

  3. Generate and copy

    Sort the result ascending or descending if you need it in order, then copy it out.

Questions people ask

How random are the numbers, really?

They come from crypto.getRandomValues, the same cryptographically secure source browsers use for encryption keys — not the weaker Math.random(), which is not designed to resist prediction. Draws are also checked with rejection sampling so no number in the range is even slightly favoured.

What is rejection sampling and why does it matter?

A naive way to squeeze a random number into a range is to take a big random number modulo the range size — but unless the range divides evenly into that space, the low end of the range comes up very slightly more often. Rejection sampling avoids this by discarding and redrawing any value that would cause that bias, so every number in your range is exactly equally likely.

What happens if I ask for more unique numbers than exist in my range?

The tool tells you exactly how many unique whole numbers actually exist between your minimum and maximum, and asks you to either lower the quantity or allow duplicates — it will never silently repeat a number when you asked for none.

Can I generate numbers for a raffle or giveaway?

Yes — set "allow duplicates" off so each draw is unique, which is exactly what a fair raffle needs.

Is my range or the numbers generated sent anywhere?

No. Generation happens entirely inside your browser — there is no server involved, so nothing about what you generate is ever transmitted or logged.

Bookmark this page — the tool keeps working offline, and your settings stay in this browser. Built by Dynamb Technologies, who make software for a living.