Random Number Generator
Generate one or many random numbers in any range. Integers or decimals, unique or repeatable, with optional reproducible seed.
Generator settings
Updates as you typeExamples
How It Works
For integer generation, we use rejection sampling to eliminate modulo bias. A naive
val % range is slightly biased when the raw random space isn't evenly divisible by the range — so values above the largest clean multiple of the range are discarded and resampled. The result: a perfectly uniform distribution.The unique mode uses two strategies depending on density. When your count is close to the range (e.g., 6 from 1–49), we build the full pool and Fisher–Yates shuffle it. When the range is much larger than the count, we keep drawing and skip any value we've already seen. The unique constraint requires the integer range to contain at least as many values as you ask for.
The optional seed replaces the CSPRNG with a deterministic PRNG (mulberry32). Given the same inputs and the same seed, the sequence is identical every time — useful for reproducible demos, test fixtures, and shareable links. Leave the seed blank for true randomness.
Tips & Best Practices
Frequently Asked Questions
Is this cryptographically secure?
When the seed field is empty, yes — output comes from your browser's crypto.getRandomValues(), which is suitable for cryptographic use. If you set a seed, the output becomes deterministic and is NOT secure: anyone who knows the seed can reproduce the sequence.
What's the difference between seeded and unseeded mode?
Unseeded draws use a CSPRNG — each roll is independent and unpredictable. Seeded draws use a deterministic PRNG (mulberry32): the same seed + settings always produces the same sequence, which is what you want for reproducible demos, tests, or shareable links.
Why can't I generate 100 unique numbers from 1–10?
The range only contains 10 distinct integers, so it's mathematically impossible to draw 100 unique values. Either reduce the count to 10 or less, or expand the range so it's at least as large as the count.
Does the sort option affect the randomness?
No. Sorting rearranges already-generated numbers; it doesn't change which numbers were drawn. The random process happens first, sorting happens after.
How large a batch can I generate?
Up to 10,000 numbers at a time. Very large grids render in a scrollable area, and the distribution histogram becomes more meaningful as the sample grows.