Random number generator
Cryptographically random integers in any range.
A Random Number Generator produces a random number on demand, using a deterministic algorithm or a cryptographically strong random source. Output is generated entirely in your browser so nothing is sent to a server. Generate single random numbers or lists within a custom range.
Cryptographically random integers in any range.
Cryptographically secure random integers in any range. Single value or list.
The Random Number Generator produces single random numbers or lists within your specified range. Uses cryptographically secure randomness via the Web Crypto API. Shows basic statistics (min, max, mean) for generated lists.
A random number generator (RNG) returns one or more integers drawn uniformly from a closed interval [min, max]. The generator on this page draws from the browser's cryptographic entropy pool (Web Crypto API), so each draw is independent of the previous one and unpredictable to anyone who did not observe the operating system seed. Practical uses include picking a giveaway winner, choosing a row in a spreadsheet for spot-checking, randomizing test data, deciding turn order in a board game, seeding a Monte Carlo simulation, sampling participants for a research study, or just settling an argument without flipping a coin.
Two settings control what you get back: range (min and max) and count. A third toggle, "Allow duplicates," decides whether the draw is with replacement (a duplicate can appear) or without (every number in the output list is unique). Without-replacement draws are equivalent to shuffling a deck and dealing the top N cards, which is what you want for raffle winners or selecting employees for an audit.
Under the hood the page calls crypto.getRandomValues(new Uint32Array(1)) to fetch a 32-bit unsigned integer between 0 and 4,294,967,295, then maps it into the target range using min + (raw % range). For ranges smaller than 2^31 this introduces a tiny modulo bias on the largest residues, undetectable in typical uses; for cryptographic randomness in giant ranges, a rejection-sampling loop would be the textbook fix. The draw repeats until the requested count is reached, with a seen-value map skipping repeats when duplicates are disallowed.
range = max - min + 1 draw = min + (crypto32() mod range) unique = draw and seen[draw] == 0 output = [draw1, draw2, ..., drawN]
crypto.getRandomValues, seeded by the OS entropy pool.You run a giveaway with 240 valid entries. Set min = 1, max = 240, count = 5, Allow duplicates off. Click Regenerate. The generator returns five unique integers (for example 73, 12, 198, 207, 41). Match each integer to the row number in your entry spreadsheet to find the winners.
| Use case | Min | Max | Count | Duplicates |
|---|---|---|---|---|
| Coin flip | 0 | 1 | 1 | On |
| Six-sided dice | 1 | 6 | 1 or N | On |
| Pick a row in a 1000-row sheet | 1 | 1000 | 1 | On |
| 5 raffle winners from 240 entries | 1 | 240 | 5 | Off |
| Lottery-style 6 of 49 | 1 | 49 | 6 | Off |
| Shuffle 30 students into pairs | 1 | 30 | 30 | Off |
| Monte Carlo seed | 0 | 2147483647 | 1 | On |
It uses the Web Crypto API's crypto.getRandomValues, which returns cryptographically secure pseudo-random numbers (CSPRNG) seeded by the operating system's entropy pool. That is the same primitive browsers use for HTTPS session keys. It is not Math.random, which is a non-cryptographic algorithm not safe for security purposes.
When Allow duplicates is unchecked, the count cannot be larger than the size of the range. Range size equals max minus min plus 1. For example, 1 to 10 has 10 unique integers, so the count cap is 10. Increase the range, lower the count, or allow duplicates.
Yes for low-stakes draws like Instagram giveaways, classroom lottery picks, podcast contests, or team-name shuffles. For regulated gambling, lottery, or legal sweepstakes, you typically need a third-party auditable RNG with a published seed and verification certificate. This tool does not produce a verifiable certificate.
You likely have Allow duplicates on. In a uniform random draw, duplicates are normal and expected: drawing 10 numbers from 1 to 100 has a 37 percent chance of at least one repeat (birthday paradox math). Turn off duplicates to draw without replacement.
The generator handles integer ranges up to JavaScript's safe-integer limit (2^53 minus 1) per side and counts up to 500 numbers in one draw. For very large lists or 64-bit ranges, you would need server-side BigInt handling. Most contest, classroom, and quick-decision uses fit comfortably inside the default 1 to 100 range.