Random numbers settle raffles, assign homework problems, split teams and seed games — jobs where fairness is the whole point. This generator uses the browser's cryptographic source with rejection sampling, so every number in your range is exactly equally likely.
Why the randomness quality matters
The lazy approach — Math.random() × range — has two flaws: the generator is predictable by design, and the naive mapping gives lower numbers a slightly better chance (modulo bias). For picking a raffle winner, "slightly unfair" is the one property you can't have. crypto.getRandomValues plus rejection sampling eliminates both.
With and without repeats
Default draws are independent — the same number can appear twice, like dice. No-repeats mode draws like lottery balls via a partial Fisher–Yates shuffle: each value appears at most once, which is what team assignments and prize draws usually want. The math guard is automatic: you can't draw 20 distinct numbers from a range of 10, and the tool says so rather than looping forever.
Independence and the "due number" myth
Ten draws without a 7 doesn't make 7 more likely on the eleventh — each draw forgets everything. That intuition (the gambler's fallacy) is worth killing wherever it appears; the history list below the result exists for records, not predictions.
Neighbors in the randomness family
Rolling game dice with modifiers is the dice roller's specialty; random strings for security are the password generator's. All three share the same crypto source and the same promise: generated locally, nothing sent anywhere.
Works offline; no-repeat mode supports ranges up to 1,000,000.