Random integers & decimals

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

Draw integers or decimals in any inclusive range using crypto.getRandomValues(). Single Number mode returns one value; List / Advanced returns many, with optional precision and no-duplicate integers.

Mode

Result

Previous results

No results yet.

Random numbers: uses, fairness, and security

When you need unpredictable values—inclusive ranges, lists without replacement, or decimal samples—understanding where randomness comes from helps you pick the right tool and avoid weak sources for sensitive work.

The math of randomness

True randomness in nature comes from physical noise sources hardware RNGs can measure. Pseudo-random sequences are deterministic from a seed but can look random statistically. This page uses the browser’s Web Crypto API, which is intended for security-sensitive random bytes on modern platforms.

Practical uses

  • Giveaways & raffles — winner from ticket numbers or entries.
  • Sampling — participants or rows for surveys and experiments.
  • Games & simulation — dice-style draws and Monte Carlo workflows.
  • Testing — placeholders and fuzz inputs in development.

Security note

Use cryptographically strong RNGs when prediction would help an attacker (keys, tokens, high-stakes draws). This tool uses crypto.getRandomValues(). Math.random() is fine for low-stakes UI or games but is not appropriate for secrets.

Range, limits, duplicates

Lower and upper bounds are inclusive. Single Number mode supports very large integer ranges. In list mode you can request up to 1000 values. With integers and duplicates off, draws are without replacement until the range is exhausted (count cannot exceed the number of integers in range). Decimals are independent draws; the duplicate toggle applies only to integer list 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.