Random Number Generator
Generate secure random numbers in any range. Set min, max and count, allow or forbid duplicates, and sort the results.
Quick answer: Set a minimum, maximum and how many numbers you want, choose whether duplicates are allowed and how to sort, and we generate cryptographically strong random numbers with your browser's crypto.getRandomValues.
Last updated
Frequently asked questions
- How random are these numbers?
- They come from <code>crypto.getRandomValues()</code>, a cryptographically secure pseudo-random generator built into your browser. It's far higher quality than <code>Math.random()</code> and suitable for draws, sampling and password-style use.
- Can I generate numbers without duplicates?
- Yes — turn on 'unique' and every number in the result is distinct. This is what you want for raffles or picking lottery numbers.
- Why can't I get unique numbers sometimes?
- Unique output needs a range at least as large as your count — you can't draw 10 unique numbers from 1–5. We validate this and warn you when the request is impossible.
- What's the maximum count?
- Up to 1000 numbers per generation. That's plenty for draws, test data and sampling; for larger datasets, generate in batches.
- Can I sort the results?
- Yes — leave them in draw order, or sort ascending or descending. Sorting doesn't affect randomness; it only changes how the already-drawn numbers are displayed.
- Are negative numbers and large ranges allowed?
- Yes — set any integer min and max, including negatives, as long as max is greater than min. The generator handles the full range uniformly.
- Is this fair for a giveaway or raffle?
- Yes — because <code>crypto.getRandomValues()</code> is unbiased, each number in the range is equally likely. For public accountability, generate on screen while recording so participants can see it's live.
- Is anything uploaded?
- No — generation happens entirely in your browser. No numbers, seeds or settings are sent anywhere.
- Can I use this to pick a winner from a list?
- Generate one number in the range 1 to N and match it to the Nth entry on your list. For spinning a visual wheel instead, try our Random Picker Wheel.
- Does it reseed each time?
- The browser's CSPRNG manages its own entropy, so every generation is independent and unpredictable — there's no seed to set or reuse.