utilduck
Home · Brain & Games · Random Number Generator

Random Number Generator

Set the range and count, then generate a list of random integers.

Generated numbers

About random numbers

This tool generates cryptographically random integers using the browser's built-in secure random source. With 'no repeats', each number in the range is drawn at most once — similar to drawing balls from a bag without replacement.

How does a random number generator work?

A random number generator picks an integer between a minimum and maximum value using the browser's cryptographically secure randomness source, so every number in the range has an equal chance of appearing. Example: min 1, max 100, count 5 might return 7, 42, 68, 91, 23.

Steps to generate random numbers

  1. Set the minimum and maximum bounds of the range you want numbers drawn from.
  2. Choose how many numbers to generate at once.
  3. Decide whether repeats are allowed or each number can appear at most once (unique mode).
  4. Click generate — the tool draws each number using the browser's secure random source.
  5. Copy the resulting list for use in a raffle, sample, or test data set.

How the range and uniqueness work

Random integer = min + (secure random value mod (max - min + 1))
  • min/max = the inclusive range numbers can be drawn from
  • unique mode = each number in the range is drawn at most once, like pulling balls from a bag without replacement

Example ranges and typical uses

RangeCountUniqueTypical use
1–61NoSimulating a single die roll
1–456YesLottery-style number set
1–1005NoRandom sampling with possible repeats
1–103YesQuick pick with no duplicates
0–11NoBinary yes/no random pick

Frequently asked questions

Is this generator truly random or just pseudo-random?

It uses the Web Crypto API's getRandomValues(), a cryptographically secure random number generator built into the browser, suitable for lotteries, giveaways, and other tasks where predictability would be a problem. This is different from the plain Math.random() function, which is faster but not designed for unpredictability.

What does "no repeats" actually do?

With unique mode enabled, once a number is drawn it is removed from the pool before the next draw, similar to picking numbered balls out of a bag without putting them back. This means you cannot request more unique numbers than the range contains.

Can I generate negative numbers?

Yes. Set the minimum to a negative value and the maximum to any value greater than or equal to it; the generator works the same way across negative and positive ranges.

Why did I get the same number twice?

This only happens if unique mode is turned off. With repeats allowed, each draw is independent, so the same number can appear more than once, just as a fairly rolled die can land on the same face twice in a row.

Cryptographic randomness accounts for the number itself; it does not guarantee fairness in how you use the result — for a lottery or raffle, double check that everyone entered has an equal, unique slot in the range you set.

Sources: MDN — Crypto.getRandomValues()

Privacy and safety

  • Runs in your browser — Everything you type is calculated on your own device. Your inputs are never sent to a utilduck server.
  • Encrypted connection — Pages are served over HTTPS, so nobody on the network can read what you load.
  • Not shared with third parties — Your inputs are not passed to analytics or advertising services.
  • Nothing is stored — Results are not saved to any server, and there is no account to create.

Last updated: 2026-08-17