ToolDashy

Random Number Generator

Generate one or many random whole numbers or decimals within any range you choose, with the option to allow or exclude duplicate values.

Numbers come from your browser's built-in cryptographic random source (crypto.getRandomValues), with every value in the range equally likely. Fine for draws, games and sampling — for passwords, use the Password Generator.

Everything you enter is processed in your browser and isn't sent to our servers.

How to use random number generator

  1. 1Enter a minimum and maximum value.
  2. 2Enter how many numbers you want generated.
  3. 3Choose whether duplicate numbers are allowed.
  4. 4Click generate, then copy the results if you need them.

About this tool

This generator uses your browser's cryptographically secure random number source (the Web Crypto API) rather than a simpler pseudo-random function, and applies rejection sampling to avoid the subtle bias that a naive random-number-in-a-range implementation can introduce.

When duplicates are disallowed, numbers are drawn from a shuffled pool of every value in the range so each is used at most once — if you ask for more unique numbers than the range actually contains, the tool tells you clearly instead of guessing.

Frequently asked questions

They come from the Web Crypto API's cryptographically secure random number generator, the same underlying source used for things like generating encryption keys — it's a stronger source of randomness than the Math.random() function many simple tools use.

Related tools