random number generator

How to use the random number generator

  1. Set the minimum and maximum values for your range — anything from -999,999,999 to 999,999,999.
  2. Choose how many numbers you need: a single pick for a dice roll, or up to 10,000 for bulk sampling.
  3. Pick decimal places: 0 for integers (1, 42, 99), 2 for hundredths (1.42, 42.17), up to 10 for scientific precision.
  4. Toggle 'Unique only' if you want no repeats — useful for lottery draws, raffle picks, or random sampling without replacement.
  5. Click Generate. Copy individual numbers or download the whole batch in one-per-line, JSON, or CSV format.

When to use it

Use this for anything that needs haphazardness: dice rolls (min=1, max=6), raffle draws (unique-only), random test data, scientific Monte Carlo simulations, randomized A/B test group assignments, lottery number picks, or just settling an argument. Every number generation uses crypto.getRandomValues — the same CSPRNG browsers use to generate cryptographic keys — so there's no biased distribution like you'd get from Math.random(). Alternative: Google's built-in RNG widget (the 'flip a coin' / 'roll a die' panel in search results) is fine for one-off casual picks, but it can't do bulk, decimals, or unique-only.

Example

Common use cases:

**Dice roll:** min=1, max=6, count=2 → simulates rolling two dice. **Lottery numbers:** min=1, max=49, count=6, unique-only → six non-repeating picks. **Random dollar amounts:** min=9.99, max=99.99, decimals=2, count=5 → five prices. **Test data:** min=0, max=9999, count=500, output=JSON → paste into your test fixtures.

Frequently asked questions

How random is it? Is it truly random?
It uses the browser's crypto.getRandomValues API — a cryptographically secure pseudorandom number generator (CSPRNG) seeded from OS-level entropy. It's not 'truly random' in the hardware sense (that requires a physical noise source), but it's indistinguishable from true randomness for all practical purposes including simulations, gaming, and scientific work.
What's the difference between this and Math.random()?
Math.random() uses a fast but predictable PRNG (typically xorshift128+ in V8) — good enough for animations, terrible for anything where fairness matters. It has detectable bias in its lower bits and a period of ~2^128. crypto.getRandomValues has no detectable bias, no predictable pattern, and is seeded from the OS entropy pool.
What does 'Unique only' do exactly?
It generates non-repeating numbers by tracking what's been picked and discarding duplicates. For integers with enough range (e.g., 1-1000 and you want 10 numbers), it's nearly instant. For small ranges (e.g., 1-10 and you want 10 numbers), it just shuffles all possible values. For decimals with very small ranges, it may generate fewer numbers than requested because duplicate collisions are harder to avoid.
Why would I use decimal mode?
For random dollar amounts ($4.99-$19.99), GPA estimates (0.00-4.00), GPS coordinates, weight measurements, or any domain with fractional precision. Decimal mode rounds to the specified number of places so you don't get floating-point artifacts like 0.1 + 0.2 = 0.30000000000000004.
Can I use this for lottery number picking?
Yes — set the lottery's range (e.g., 1-49), set count to the number of picks (e.g., 6), enable 'Unique only', and hit Generate. The CSPRNG guarantees every combination is equally probable. That said, picking your own numbers has the same odds — the randomness doesn't improve your chances, it just saves you the mental effort.
How many numbers can I generate at once?
Up to 10,000 per generation. For unique-only mode with a small integer range, you'll be capped at the actual number of possible values (e.g., only 100 unique integers exist between 1-100). Decimal mode may produce fewer than requested when the range is very narrow relative to the count.

Related tools

Last updated: 2026-05-11