This random integer generator picks whole numbers in any range you set — from 1 to 100 for a raffle, from -50 to 50 for test data, or 10 unique numbers out of a million for a sample. It draws from your browser’s cryptographic random source (the same getRandomValues API used for security work), not from a predictable formula, so every draw is genuinely unpredictable.
Two options cover most real uses: unique guarantees no repeats (a draw without replacement, like lottery numbers), and sorted presents the result in ascending order. Nothing is uploaded; the numbers are generated and stay on your machine.
Why the random source matters
Most “random” numbers in software are pseudo-random: a formula that produces a sequence which looks scattered but is fully determined by its starting seed. That is fine for shuffling a playlist and dangerous for anything with stakes, because anyone who learns or guesses the seed can replay the sequence. This generator asks the browser for cryptographic randomness — values harvested from your operating system’s entropy pool via crypto.getRandomValues — and then maps them into your range with rejection sampling, a technique that avoids the subtle bias (called modulo bias) that naive “random mod range” code introduces. The result: every integer in your range is equally likely, every time.
The two options, explained with draws
No repeats. A raffle drawing 10 winners from 500 tickets must not draw ticket 217 twice. With unique mode on, the generator keeps drawing until it has the count you asked for, all different — and it tells you honestly if you ask for more unique values than the range contains (you cannot pick 101 unique numbers between 1 and 100; the tool refuses instead of looping forever). Sorted. Purely presentational: the same draw, printed in ascending order — handy when you are reading numbers aloud, comparing against a sorted list, or pasting into a spreadsheet.
Typical uses
Classroom cold-calls and raffle draws; generating test data and fuzz inputs with negative ranges; picking a random sample of rows, orders or tickets for a quality check; dice substitutes and game setups (two numbers from 1 to 6, or a d20 range of 1 to 20); tie-breakers and rota picks. For a lottery-style draw, set the count and range to the game’s (6 from 1-49, say), switch on unique, and generate.
Honest limits
Cryptographic randomness makes the numbers unpredictable; it does not make a draw auditable. If you are running a public competition, use a witnessed or third-party draw service whose process others can verify — a private browser tab, however honest its maths, cannot prove fairness to your entrants. The generator also caps nothing artificially, but absurd requests (ten million numbers) will simply take a while and fill a big text box.
Frequently asked questions
Are the numbers really random?
They come from your operating system’s cryptographic entropy source through the browser’s WebCrypto API — the strongest randomness available to a web page, and the same source used to generate keys and tokens. No server is involved.
Why did I get an error asking for unique numbers?
Because you asked for more unique values than exist in the range. Widen the range or lower the count — mathematics is not negotiable on this one.
Can it generate decimals or negative numbers?
Negative integers, yes: set a negative minimum. Decimals, no: this tool is deliberately integers-only, because rounding a random decimal is how off-by-one arguments start.
Can I use it for passwords or tokens?
No — use a password generator built for that, which draws full-entropy strings in the right format. Integers from this tool are for draws, tests and games.
Related tools
Versión en español: Generador de Números Enteros Aleatorios — Enteros al Azar en Cualquier Rango. You may also like: Random Password Generator · List Randomizer.
Embed this tool on your website — free
Copy the code below to add this working tool to your own page. A small credit link stays with it — that’s all we ask.

Pingback: Generador de Números Enteros Aleatorios — Enteros al Azar Gratis, Únicos y Ordenados