Pick a Fair Number Between Any Two Values
Set a minimum and maximum and this tool picks an integer somewhere in between, with every value in range equally likely to come up. It's built for the everyday cases — deciding who goes first, running a raffle, generating quick test data — not for anything security-sensitive.
A new number is generated as soon as the page loads and every time you change Min or Max. Click the refresh icon for another one without changing the range, or copy the result with one click.
How is the number actually generated?
This tool uses the browser's Math.random(), a fast, general-purpose
pseudo-random number generator built into JavaScript. That's a deliberate choice, not a
shortcut — for picking a raffle winner or a dice roll, it's statistically uniform and
unpredictable enough. It is not the same as a cryptographically secure generator, though,
and shouldn't be used to produce anything like a password or a security token. For that,
our password generator and
UUID generator both use the Web Crypto API instead, which
is built for exactly that purpose.
How do I run a fair raffle or giveaway?
- Number your entries starting from 1. If you have 200 entries, set Min to 1 and Max to 200.
- Generate a number.
- The number corresponds to the matching entry on your list — if it lands on 47, whichever entry you numbered 47 wins.
- To draw a second winner, generate again and skip any repeat.
Screenshotting the result with the Min/Max values visible gives you a simple record that the draw wasn't tampered with after the fact.
Can I generate a number between 1 and 100, or any other range?
Yes — that's the default range shown when the page loads. Use the plus and minus buttons on Min and Max to set any range you need, including negative numbers (for a coin-flip- style range like -1 to 1) or a narrow range like 1 to 6 for a single die roll. Both bounds are inclusive, so a range of 1 to 6 can return 1 or 6 themselves, not just the numbers between them.
Is this truly random, or just pseudo-random?
Pseudo-random, and that's worth being upfront about. Math.random() produces
output that's statistically uniform and unpredictable for practical purposes, but it isn't
generated the same way a cryptographic key would be. For games, raffles, and everyday
decisions that distinction doesn't matter. For anything where unpredictability is a
security requirement, use a cryptographically secure tool instead.
Related tools
- Random Choice Generator — paste a list of options and have one picked at random, instead of a number.
- Random IP Address Generator — generate sample IPv4 and IPv6 addresses for test data.
- Random Date Generator — pick a random date between any two dates, instead of a number.
Last reviewed: August 2026