Random Number Generation

🎲

Random Number Generator: Integers, Decimals & Secure

Generate cryptographically secure random integers or decimals in any range. Single Number mode for one result; List/Advanced for multiple values, precision, and optional no-duplicates.

Random Number Generator

Mode

Result

Previous results

No results yet.

Information hub

The math of randomness

True randomness comes from physical processes—atmospheric noise, radioactive decay, thermal noise—that are unpredictable in practice. Hardware RNGs measure these to produce genuine randomness. Pseudo-randomness comes from algorithms: given a seed, the sequence is deterministic and reproducible but passes statistical tests. This tool uses the Web Crypto API, which on modern devices often mixes in system entropy and is suitable for fairness-sensitive use.

Practical uses

Common use cases:

  • Giveaways & raffles — pick a winner from ticket numbers or entries.
  • Statistical sampling — random participants or data points for surveys, A/B tests.
  • Gaming & simulations — dice rolls, Monte Carlo methods.
  • Random assignment — control vs treatment groups.
  • Testing & placeholders — test data or random IDs in development.

Security

Cryptographically secure generation is needed when guessing the next value could help an attacker: encryption keys, session tokens, lottery draws, or any security-sensitive choice. This generator uses crypto.getRandomValues(), which is built for that. Standard PRNGs like Math.random() are fine for games or UI variety but can be predictable—don’t use them for secrets or fairness-critical draws.

Range, limits & duplicates

Lower and upper limits are inclusive. Single Number mode supports very large ranges (e.g. 1 to 10500). In List/Advanced you can request up to 1000 numbers. For integers, turning off “Allow duplicates” draws without replacement—each value appears at most once until the range is exhausted, so count cannot exceed the number of integers in your range. Decimals are always drawn independently; “Allow duplicates” applies only to integer mode.

Random Number Generator: Integers, Decimals & Cryptographically Secure

Free random number generator using the Web Crypto API. Pick one number or generate lists of random integers or decimals in any range. Single Number mode for “number between 1 and 100”; List/Advanced for count, precision, and optional no-duplicates. No sign-up, runs in your browser.

What This Tool Does and Who It’s For

  • Who it’s for
    Teachers running class draws, developers needing test data or random sampling, researchers doing randomisation, or anyone running a small lottery or game. The same secure source backs both modes.
  • Fairness and privacy
    Every value in the range has equal probability (uniform distribution). All generation happens in your browser; nothing is sent to a server.
This random number generator gives you numbers from a cryptographically secure source. In Single Number mode you set a lower and upper limit and get one random integer each time—perfect for “pick a number from 1 to 100,” dice ranges, or a quick winner draw. List/Advanced mode adds: how many numbers to generate, integer vs decimal, decimal precision (up to 999 places), and an option to disallow duplicate integers so each draw is without replacement.

Where the Numbers Come From: Crypto vs Pseudo-Random

  • Uniform mapping
    Raw random bytes are mapped to your range so each integer (or decimal) has the same probability. For integers in a range of size n, each outcome has probability 1/n1/n.
  • When to use what
    Use this generator when you need “fair” random numbers for people (e.g. picking a winner). For passwords or secret keys, use a dedicated password generator. For reproducible research, use a PRNG with a fixed seed in your own code.
Most programming runtimes provide a pseudo-random number generator (PRNG): given a seed, the sequence is deterministic and reproducible. That’s fine for games or simulations where predictability doesn’t matter. This tool uses the Web Crypto API (crypto.getRandomValues()), which draws from your device’s cryptographically secure random source—the same kind used for keys and tokens. The sequence isn’t predictable from previous outputs, so it’s suitable for fairness-sensitive uses like raffles or sampling.

Single Number Mode: One Integer in a Range

Set a lower and upper limit (both inclusive). The tool returns one random integer n with lower \leq n \leq upper. For example, 1 and 6 gives a fair dice result; 1 and 100 gives a number between 1 and 100. Very large ranges (e.g. 1 to 10500) are supported. Each click produces a new draw from the same uniform distribution.

List/Advanced Mode: Count, Precision, and Duplicates

You still set lower and upper bounds. Then: choose how many numbers to generate (up to 1000), integer or decimal, and (for decimals) how many digits after the decimal point. For integers you can turn off “Allow duplicates”—then each draw is without replacement until the range is exhausted (so count cannot exceed the number of integers in the range). Decimal mode produces values uniformly in the interval; precision controls how many decimal places are shown.

Uniform Distribution and What “Random” Means Here

Here, “random” means each value in the range is equally likely. For integers 1 to 10, each has probability 1/101/10. For decimals in an interval [a,b][a,b], the generator approximates a uniform distribution over that interval to the chosen precision. Outcomes are independent: past results don’t affect the next. For other distributions (e.g. normal, exponential) you’d apply a transformation in your own code or use a statistics package.

Random Number Generator FAQ

? How does this random number generator work?

It uses the Web Crypto API (crypto.getRandomValues()), which pulls from your device’s cryptographically secure random source—the same one used for encryption keys and security tokens. Integers are mapped to your chosen range so each value has equal probability; decimals are scaled to your lower and upper bounds with the precision you set.

? What’s the difference between Single Number and List/Advanced mode?

Single Number gives you one random integer between your lower and upper limit (inclusive)—ideal for “pick a number from 1 to 100” or a quick dice-style result. List/Advanced lets you generate multiple numbers at once, choose integer or decimal, set decimal precision, and optionally allow or disallow duplicate values when drawing integers.

? Is this random number generator safe for raffles or giveaways?

Yes. The underlying source is cryptographically secure and not predictable from past results, so it’s suitable for fairness-sensitive uses like picking a winner. For passwords or secret keys, use a dedicated password generator instead.

? Why can I get the same number twice?

Each draw is independent. Getting the same value again is normal for a fair generator. In List/Advanced mode you can turn off “Allow duplicates” for integers so each draw is without replacement (no repeats until the pool is exhausted).

? What does “precision” mean for decimals?

Precision is how many digits appear after the decimal point (e.g. 2 gives 3.14; 5 gives 3.14159). The generator produces decimals uniformly in your interval and rounds to that many places. Higher precision is useful for simulations or statistics where you need fine-grained random reals.

? How many numbers can I generate at once?

Single Number mode returns one value per click. In List/Advanced you can request up to 1000 numbers in one go. For very large batches (e.g. millions), a local script or stats package is more practical.