Random Number Generator Guide

Generate one or more random numbers within a custom range. Copy results instantly.

Back to Random Number Generator

What does this tool do

The Random Number Generator produces one or more random numbers within a custom range. Choose integers or floats, allow duplicates or require unique values, and set the count (up to 1,000 per request). Copy results with one click. All generation runs in your browser—no server, no bias from external RNGs.

How to use it

  1. Set range — Enter minimum and maximum values. For integers, both endpoints are inclusive.
  2. Set count — How many numbers to generate (1–1,000).
  3. Choose type — Integer or float. For floats, set decimal places (1–10).
  4. Allow duplicates — Toggle on for repeated values, off for unique numbers only.
  5. Generate — Click to produce numbers. Use Copy to copy the list.

How it works

For integers with duplicates: each number is chosen independently with Math.random() over the range. For integers without duplicates: the tool uses a Fisher-Yates shuffle over the full range pool, then takes the first N values—guaranteeing uniform distribution. For floats without duplicates: rejection sampling with a Set ensures uniqueness; up to 10,000 attempts prevent hangs. Count is capped at 1,000 per request to avoid browser freeze.

All computation runs entirely in your browser. No data is sent to any server.

Use cases & examples

  • Games — Dice rolls, random picks, shuffle order.
  • Samples — Random subset for testing or demos.
  • Passwords — Seed for further processing (not cryptographically secure).
  • Simulations — Monte Carlo, random seeds for models.
  • Contests — Fair random selection from a range.

Example

  • Range 1–6, count 1, integers, duplicates allowed → one dice roll
  • Range 1–100, count 10, integers, unique → 10 distinct numbers
  • Range 0–1, count 5, floats, 3 decimal places → e.g. 0.234, 0.891, …

Limitations & known constraints

  • Max 1,000 numbers — Per single generation request.
  • Unique floats — With narrow range and many decimal places, the pool can be huge; generation may fail after 10,000 attempts.
  • Not cryptographically secure — Uses Math.random(); do not use for security-sensitive applications.
  • Integer range — Very large ranges (e.g. 1–1,000,000) with unique mode can be memory-intensive.

All calculations and conversions run entirely in your browser. No data is sent to any server, so your input never leaves your device.