Command Palette

Search for a command to run...

RA

Random Number Generator

Generate random numbers in any range, with unique-only and decimal options.

What is a Random Number Generator?

A random number generator produces one or more numbers drawn without any predictable pattern from a range you define. You set a minimum and a maximum, choose how many numbers you want, and the tool returns values spread across that interval. It is the digital equivalent of drawing numbered tokens from a bag, except the bag can hold billions of tokens and the draw is instant.

This generator runs entirely in your browser and prefers the Web Crypto API (crypto.getRandomValues) as its randomness source, falling back to the standard JavaScript generator only when Crypto is unavailable. That matters because the two sources are not interchangeable: cryptographic randomness is unpredictable enough for security-adjacent uses like picking tokens or shuffling, while ordinary pseudo-random output is fine for games and sampling but should never seed anything secret. Because the work happens locally, no request ever leaves your device and there is no rate limit to hit.

Beyond a single draw, the tool covers the cases people actually reach for: integers or decimals with a chosen number of places, unique-only batches where no value repeats (useful for lotteries, raffles, and random sampling without replacement), and bulk generation of up to ten thousand numbers at once with running totals and an average. Everything is copyable as a newline-separated list so it drops straight into a spreadsheet, a script, or a test fixture.

Randomness comes from the browser's cryptographic generator rather than from Math.random, which matters when the result decides something. Math.random is fast, seeded from an unspecified source, and explicitly not suitable for anything where predictability is a problem. The range is mapped without modulo bias, the subtle flaw where naively taking a remainder makes the lower values in a range slightly likelier than the rest.

How to use the Random Number Generator?

  1. Set the range

    Enter the minimum and maximum values. The range is inclusive for integers, so 1 to 6 can return any of 1, 2, 3, 4, 5, or 6.

  2. Choose how many

    Set the count for a single number or a bulk batch, up to 10,000 numbers per draw.

  3. Pick the options

    Toggle integers or decimals, set decimal places, and enable unique-only if no value may repeat.

  4. Generate and copy

    Click Generate to draw the batch, review the sum and average, then copy the whole list or any single value.

Key Features

  • Cryptographic Random Source

    Numbers come from crypto.getRandomValues rather than Math.random, whose sequence can be predicted from a handful of earlier outputs

  • Any range, integer or decimal

    Draw whole numbers or decimals with a configurable number of places, across positive or negative ranges.

  • Unique-only batches

    Guarantee no repeats for lotteries, raffles, and sampling without replacement, with a clear warning when the range is too small.

  • Bulk generation with stats

    Generate up to 10,000 numbers at once and see the running sum and average alongside the list.

Frequently Asked Questions

A random number generator maps an unpredictable source of bits onto the range you choose. This tool reads bytes from the Web Crypto API when it is available and scales them into your minimum-to-maximum interval, so each value in the range has an equal chance of being drawn.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!

random number generatorrandom numberrngpick a random numberrandom integerunique random numberslottery number generator