Free Random Number Generator

Generate cryptographically random integers in a range, with or without duplicates. Runs entirely in your browser using crypto.getRandomValues — no server, no logs.

Enter your details

Uncheck for a raffle-style unique pick. Range must be ≥ count.

Result
Enter your details on the left, then press Calculate.

What is this calculator for?

You need to pick a random winner for a giveaway. Or you need to randomize the order of a list of people. Or you're playing a game that requires "roll a 1-20 die" but you don't have dice. The random number generator produces random numbers within any range you specify — for games, contests, raffles, statistical sampling, or any decision where you genuinely want randomness rather than your own subconscious bias.

Why use random number generators instead of "picking randomly" yourself. Human brains are bad at randomness. Asked to pick a "random" number 1-10, most people don't pick 1, 5, or 10 — they pick 7 (most common "random" pick). Asked to pick random sequences, people avoid repeats ("random" sequences without repeats appear more "random" than truly random sequences with natural clustering). For fair selections (raffles, contests): a true random number generator is essential.

This tool produces random integers within a specified range. For more complex randomization (shuffling lists, weighted random selection), use programming tools.

How to use this calculator

Enter minimum and maximum values for the range. Pick how many numbers to generate. Optionally allow or disallow repeats (for picking N items from a set, no repeats; for rolling N dice, repeats allowed).

The generator outputs random integers from your range.

Understanding your results

The generator returns random integers. Sample: range 1-100, generate 5: 47, 82, 13, 65, 91. Each number has equal probability of being any value in the range.

True randomness vs pseudo-randomness. Most digital random number generators are "pseudo-random" — they use mathematical algorithms that produce sequences indistinguishable from random but actually deterministic (same seed produces same sequence). Modern crypto-grade PRNGs (used by browsers and operating systems) are statistically indistinguishable from true randomness for any practical purpose. True random sources (atmospheric noise, radioactive decay) are used for highest-security cryptographic applications but unnecessary for games, raffles, or sampling.

Common use cases. Contest/raffle winner selection: assign each entrant a number, use random generator to pick. Statistical sampling: select N items from a list for surveys or testing. Games: dice rolls, card draws, lottery numbers. Decision making: when you genuinely can't decide between options, randomize to bypass analysis paralysis. Cryptographic key generation: requires crypto-grade randomness (not this simple tool — use OS-provided crypto random functions).

The "lucky number" misconception. Lottery and roulette numbers have no memory or pattern. Each draw is independent. "Hot numbers" (numbers that have come up recently) are no more likely to come up next than "cold numbers" (hasn't appeared lately). This is the gambler's fallacy. Random truly means random; previous results don't predict future results in a properly-randomized system.

A worked example

Lin runs a 500-entry Instagram giveaway. She needs to pick a random winner from numbered entries 1-500.

She uses the random number generator with range 1-500, generate 1 number. Result: 287. Entry #287 is the winner. She announces the winner publicly, ideally recording the random selection on video for transparency.

For multi-prize giveaways (e.g., 5 winners): generate 5 numbers, allow repeats off (each number unique). Each gets a different prize from the prize pool.

Variation: Marcus needs to randomly assign 30 students to 6 project groups of 5 students each. Approach: assign each student a number 1-30. Generate a random shuffle of 1-30. Take groups of 5 sequentially (1-5, 6-10, etc.). The random shuffle ensures fair assignment without bias toward grouping particular students together. This is what shuffle algorithms in apps do.

Variation: Daniel is testing a 20% conversion rate hypothesis with sample of 100 customers. He needs to randomly select which 100 customers to call from his database of 5,000. Uses random generator to pick 100 unique numbers from 1-5000. Selects those customers for the test. The random selection eliminates selection bias (vs picking the first 100 alphabetically, or the most recent 100 — both would introduce bias).

Related resources

For other randomization, see Coin Flip & Dice Roller. For statistical math, the Percentage Calculator. For password generation (using crypto-grade randomness), the Password Generator. Random.org uses atmospheric noise for true random numbers and is the standard reference for high-quality randomness in contests and statistical work.

Related calculators

Frequently asked questions

Is this truly random?

It uses cryptographically secure random values from the Web Crypto API (crypto.getRandomValues) — the same source used for generating encryption keys and session tokens. These are not deterministic pseudo-random numbers; they pull entropy from the operating system's secure random pool. For non-cryptographic applications, this is overkill but harmless. For cryptographic key generation, this is exactly what you'd use.

Pseudo-random vs. true random?

Pseudo-random number generators (PRNGs) like Math.random() use deterministic algorithms seeded from a starting value — the same seed always produces the same sequence. Cryptographically secure PRNGs (CSPRNGs) like crypto.getRandomValues add OS-level entropy (mouse movements, network jitter, hardware noise) so output is unpredictable even with the algorithm known. True random number generators (TRNGs) use physical sources — radioactive decay, atmospheric noise, lava lamps (yes, Cloudflare actually does this). For 99% of use cases, CSPRNG is indistinguishable from true random.

What can I use random numbers for?

Common uses: picking a raffle winner from a numbered list, selecting samples for testing, generating dice rolls or game outcomes, picking random questions from a quiz pool, fair team assignment. Avoid for: cryptographic keys (use dedicated key-generation libraries), high-value gambling (regulatory requires audited RNG hardware), or any context where you need to prove fairness to a third party.

Are random number generators truly random?

Pseudo-random vs true random. Most digital RNGs are pseudo-random — they use deterministic algorithms that produce sequences indistinguishable from random in practical use. Modern cryptographically-secure PRNGs (used in browsers and OSes) are sufficient for nearly all applications. True random number generators use physical sources of randomness (atmospheric noise, radioactive decay, quantum events). Random.org uses atmospheric noise from radios. Cloudflare uses lava lamps. These are used for highest-security cryptographic key generation; not necessary for games, raffles, or sampling.

Why does this number keep appearing in my 'random' selections?

Confirmation bias plus small sample sizes. With a small number of random draws, certain values may appear multiple times by chance. With true randomness, you'd expect clusters and repeats. The 'random doesn't feel random' phenomenon is one reason streaming services like Spotify use 'pseudo-random' shuffles that actively avoid repeats — pure random shuffles produce repeats that feel non-random. For raffle drawings: use the actual random output; clusters and repeats over many draws are expected.

Can I use random number generators for security?

Only with cryptographic-grade RNGs, not this simple tool. For cryptographic applications (password generation, encryption keys, security tokens): use the OS-provided random functions or audited crypto libraries (Node.js crypto.randomBytes, Python os.urandom, browser crypto.getRandomValues). Simple math-based random functions (Math.random in JavaScript) are NOT cryptographically secure — fast and good for games, but predictable enough that adversaries could potentially exploit. For consumer apps: always use crypto-grade random for any security purpose.

How do I use random numbers fairly for a contest?

Document the process. List all entrants with consecutive numbers (1 through N). Use a verified random generator (Random.org is well-known and audited). Record the selection process on video — the screen showing the random generator with the range and the result. Announce the winning entry number plus the entrant. Make sure the entrant list is sealed before the draw (no addition or removal after entries close). For high-stakes contests: use a notary or independent observer; some jurisdictions require formal sweepstakes rules and registered drawings. For casual giveaways: video recording and immediate public announcement is sufficient.

Why is human-generated randomness biased?

Brains pattern-match constantly. Asked to pick a 'random' number 1-10, most people don't pick: 1 (feels too 'low'), 10 (feels too 'high'), 5 (feels too 'middle'), or repeated digits. The most popular human-chosen 'random' number 1-10 is 7. Asked to pick a 'random' 4-digit pin, people pick: birthdays (compromised by hackers using birth-year-targeted attacks), patterns (1234, 0000, 1111), or culturally significant numbers (9/11 = 0911, etc.). True randomness would produce these patterns with same probability as any others; humans systematically avoid them. For security or fairness applications: always use computer-generated random rather than human picks.

Sources