Random Number Generator

Generate random integers or decimals within any range. Choose how many numbers to produce, whether they should be unique, and whether to use cryptographically secure randomness. Everything runs locally in your browser.

Configure your random numbers

Number type

Configure the range and press Generate.

How the generator works

For small to moderate ranges the generator uses crypto.getRandomValues where available, providing cryptographically secure randomness. On browsers without the Web Crypto API, it falls back to Math.random().

For integer mode, every value between the minimum and maximum (inclusive) has an equal chance of appearing. For decimal mode, values are generated continuously across the range and rounded to 4 decimal places.

When Unique numbers only is enabled, the generator ensures no duplicate values appear in a single run. The maximum count is limited by the number of integers in the range.

Common uses

  • Picking lottery or raffle numbers.
  • Drawing random samples from a range for testing or simulation.
  • Randomising order of items for games or classroom activities.
  • Generating test data for software without sending any data off-device.
  • Coin flips and dice rolls (use range 1–2 or 1–6 respectively).

Frequently asked questions

The generator uses the Web Crypto API (crypto.getRandomValues) when available, which provides cryptographically strong randomness. On older browsers it falls back to Math.random(), which is sufficient for games and casual use but not suitable for security-critical applications.

Yes. In integer mode, both the minimum and maximum values are possible outcomes, each with the same probability as any other integer in the range.

The calculator returns a clear error. Unique mode requires that the count does not exceed the number of integers in the range. For example, you cannot get 100 unique integers from a range of 1–50.

For informal use — picking numbers for a family raffle, choosing a random order for a game — yes. For regulated lotteries or anything with money at stake, use a certified random source. This tool is provided for entertainment and general use only.