Random Number Generator — secure & unbiased
Pick any min/max range and how many values you want. Numbers are generated using the browser's CSPRNG with proper rejection sampling — uniformly distributed and unbiased.
Pick any min/max range and how many values you want. Numbers are generated using the browser's CSPRNG with proper rejection sampling — uniformly distributed and unbiased.
The numbers come from your browser's cryptographically secure pseudo-random number generator (crypto.getRandomValues). It draws 32-bit unsigned integers from the OS's entropy source, then this tool applies rejection sampling to map them to your range without bias — naive 'modulo by range' produces small but measurable bias for non-power-of-2 ranges, which we explicitly avoid.
For values you genuinely need to be 'random' for security (lottery picks, verification codes, raffle winners), this is the right approach. For statistical sampling or simulation that needs reproducibility, you'd want a seeded PRNG instead — those are deterministic given a seed, which trades unpredictability for repeatability.
They are cryptographically pseudo-random — secure for unguessable use cases (passwords, raffle picks, verification codes). For 'true' randomness from physical entropy (atmospheric noise, radioactive decay), services like random.org use external entropy sources. The CSPRNG in your browser is sufficient for everything except the most paranoid security requirements.
If you take a 32-bit random integer and apply 'value % range', you get bias when range doesn't divide 2^32 evenly. The bias is small (parts per million for typical ranges) but real. Rejection sampling — discarding values that would map unfairly and re-rolling — eliminates the bias entirely.
Min and max can be any integer. The 'unique values' mode is limited to ranges that fit in memory (millions of values), but for typical use cases (1-100, 1-10000, etc.) there's no practical limit.
No — this tool uses the system CSPRNG which is non-deterministic. For reproducible random sequences (testing, simulation), use a seeded PRNG library like seedrandom in Node or numpy.random in Python.
For actual cryptographic secrets (API keys, JWT secrets, encryption keys), use a tool that produces longer random strings — base64-encoded bytes, for example, or pure UUIDs. This generator outputs short numeric ranges; use the password generator or UUID generator for cryptographic-grade secrets.
Where unbiased random numbers actually matter.
Number every entry, set range to 1..N entries, generate one (or several for multi-prize giveaways). The audit trail is the screenshot of the generator with its range and result.
Tick 'Unique values', set count to 6 (Loto) or 5+1 (EuroMillions main + bonus draws separately), set range to the official limits. Done.
Need to QA-test 50 random users out of 100,000? Generate 50 unique numbers between 1 and 100,000, then pull those rows from your database.
Quick prototype needs 200 random IDs, ages, or scores? Generate the column in seconds instead of writing a one-off script.
Habits that prevent random-number gotchas.
min=1, max=10 means 'between 1 and 10 inclusive'. Off-by-one errors are common — always verify by setting count=1000, sort, and confirming the smallest value equals min and largest equals max.
If you're picking 5 raffle winners from 100 entries, you almost certainly want unique. Without it, you can pick the same entry twice — usually not what raffles want.
Public raffles benefit from a documented method. Stating 'numbers generated by randomnum.app at 14:35 UTC, range 1-N, count P' is enough for most jurisdictions; some require a notary.
This tool is for one-off picks. In code, use crypto.getRandomValues() (browser/Node) or your language's secrets module (Python). Don't rely on Math.random() for anything that matters.