Random Number Generator

Pick random integers within any inclusive Minimum (From) and Maximum (To) range using the browser Web Crypto API (crypto.getRandomValues). Supports drawing 1 to 500 numbers, toggling Allow Duplicate Numbers on or off, and sorting results in Original Random, Ascending, or Descending order.

Random Number Result
42
Sort Output:
Advertisement

How to Use Random Number Generator

Enter your inclusive **Minimum (From)** (default `1`) and **Maximum (To)** (default `100`) integer bounds—if Minimum is greater than Maximum, the tool automatically swaps the bounds into `[minVal, maxVal]`—and set **Quantity to Pick** between `1` and `500`. By default, **Allow Duplicate Numbers** is unchecked so every drawn integer is unique (capped automatically at the total available integers in the range `maxVal − minVal + 1`); check **Allow Duplicate Numbers** when sampling with replacement. Choose **Sort Output** (`Original Random`, `Ascending (Low to High)`, or `Descending (High to Low)`), click **Generate Again** to draw fresh 32-bit values via `window.crypto.getRandomValues(new Uint32Array(1))`, and click **Copy** to copy the comma-separated results. For cryptographic strings or UUIDs, visit our Random String Generator and UUID Generator.

  1. 1

    Set Minimum (From) & Maximum (To)

    Enter the inclusive lower and upper integer limits for your draw (e.g., 1 to 100).

  2. 2

    Enter Quantity to Pick (1–500)

    Choose how many numbers to generate in a single batch (capped at range size when duplicates are off).

  3. 3

    Set Duplicates & Sort Order

    Leave Allow Duplicate Numbers unchecked for unique draws, and pick Original Random, Ascending, or Descending sort.

  4. 4

    Click Generate Again & Copy

    Click Generate Again to draw new Web Crypto random integers and click Copy to export the comma-separated list.

Worked Input & Output Example

Drawing 6 Unique Non-Repeating Random Numbers Between 1 and 49

When Allow Duplicate Numbers is unchecked, the generator tracks drawn integers in a Set until the requested quantity is filled.

1. Generator Settings
Minimum: 1 · Maximum: 49 · Quantity to Pick: 6

Allow Duplicate Numbers: Unchecked (Unique) · Sort Output: Ascending (Low to High).

2. Web Crypto Draw

crypto.getRandomValues(Uint32Array(1)) draws integers in [1, 49] without duplicates, then sorts ascending.

Client-side calculation
3. Generated Numbers (6)
7, 14, 23, 31, 42, 48

6 unique integers in [1, 49] copied as a comma-separated string.

Entropy SourceWeb Crypto APIcrypto.getRandomValues()
Range IntervalInclusive [Min, Max]Both endpoints can be drawn
Quantity Limit1 to 500 NumbersCapped at range size if unique
Sort Options3 Ordering ModesRandom, Ascending, Descending

Related Free Tools

Explore more browser-based tools in Student & Academic Tools or browse the complete All Tools Directory.