Random Number Generator
Random Number Generator — pick random integers or decimals in any range, with or without duplicates. Copy the list. Free, no signup.
About Random Number Generator
The Random Number Generator picks random integers or decimal numbers between any minimum and maximum you set. Choose how many, decide whether duplicates are allowed, and copy the result. It’s useful for raffles, sampling, dice rolls, choosing a winner, generating test data, and any quick “let me just roll something” task.
How it works
The generator uses your browser’s built-in Math.random(), which produces a pseudo-random value uniformly distributed between 0 and 1. The tool stretches that value into your chosen range — for integers, Math.floor(rand × (max − min + 1)) + min; for decimals, rand × (max − min) + min, rounded to the precision you pick. Pseudo-random means deterministic seeding under the hood, but for practical purposes the output is statistically uniform and unrepeatable.
For unique-result mode (Allow duplicates off), the integer path uses a Fisher–Yates shuffle of the full range and takes the first N values — this is the textbook algorithm for “pick N unique items from a set of M”. The decimal path retries on collisions at your chosen precision, which is almost always unnecessary because decimal collisions are vanishingly rare at any reasonable precision, but the tool handles it correctly.
Use cases
- Raffles and giveaways — assign numbers 1 through N to your entrants, pick K winners with duplicates off.
- Dice rolls — d6 (1–6), d20 (1–20), d100 (1–100), or any custom-sided die.
- Lottery picks — pick 6 numbers from 1 to 49 with duplicates off, sorted to taste.
- Sampling — pick N random row numbers from a spreadsheet of size M to audit.
- Test data — generate dummy IDs, ages, prices, or any numeric field for development.
- Random delays / weights — decimal mode for
setTimeout-style randomisation or weighting. - Probability experiments — generate 1,000 random numbers, count how many fall in a sub-range to verify a probability hypothesis.
A note on “true” randomness
This tool uses Math.random(), which is a pseudo-random number generator (PRNG). It’s fast, statistically uniform, and good enough for everything you’d reasonably want a free web tool to do — raffles, dice, sampling, simulations. It is not cryptographically secure. If you’re generating encryption keys, session tokens, password salts, or anything where an attacker predicting the output matters, use crypto.getRandomValues() in code or a hardware RNG instead. For everyone else, this is the right tool.
All randomness happens in your browser. No numbers, ranges, or results leave your device. Free, no signup, no watermark.
Frequently asked questions
It uses your browser's built-in pseudo-random number generator (Math.random) to pick numbers uniformly between your min and max. For integers it includes both endpoints; for decimals it rounds to the precision you choose. Everything runs in your browser — no server call.
It's pseudo-random, which is what every common 'random' tool uses. Math.random() is good enough for raffles, sampling, dice, lottery picks, password salt examples, and most everyday uses. For high-stakes cryptographic work, use a CSPRNG (Web Crypto's getRandomValues) — this tool is built for convenience, not key generation.
Yes — uncheck 'Allow duplicates'. The tool returns a unique set. For integers it uses a Fisher–Yates shuffle of the full range and takes the first N, which guarantees uniqueness as long as your count is at most (max − min + 1). For decimals, it retries on collisions at the chosen precision.
Up to 10,000 in a single batch. That's enough for almost any sampling or simulation; if you need more, run it again or split it into smaller batches.