Free Random Number Generator
Math.random() isn't good enough when fairness matters. The Random Number Generator draws from your device's cryptographic random source with rejection sampling — so every number in your range is exactly equally likely, with zero modulo bias. Set any min/max, draw up to 1000 numbers, and optionally require uniqueness or sorted output for draws, sampling, and testing.
How to Use the Random Number Generator
- Enter the min and max of your range, and how many numbers you want.
- Optionally require unique numbers or sorted output.
- Click Generate numbers — drawn with an unbiased secure algorithm.
- Copy the results for your draw, sample, or test.
Features
Any integer range; up to 1000 numbers; unbiased rejection sampling; unique-only mode; sort option; copy.
Benefits & Use Cases
Run raffles and giveaways fairly, sample datasets, generate test inputs, pick random winners, or simulate dice and lots.
Tips
For unique draws, the count can't exceed the range size — the tool will tell you. For cryptographic uses (like key material), prefer raw random bytes from the Secure Token Generator.
Frequently Asked Questions
Is this truly random?
It uses your device's cryptographic random number generator — the same source operating systems use for keys — not a predictable pseudorandom formula.
What is modulo bias?
Naively doing random() % range favors some numbers when the range does not divide the generator's output evenly. Rejection sampling discards out-of-range values to keep every outcome equally likely.
Can I draw unique numbers?
Yes — enable "unique numbers only" for lottery-style draws with no repeats. The count must fit inside the range.
Why is Math.random() not enough?
It is predictable and sometimes biased — fine for games and shuffling playlists, but not for draws, sampling, or anything where fairness or security matters.
Related Tools
PIN Generator
Generate secure random PINs free with NToolHub. Custom length, leading-zero and repeat controls, bulk output — 100% in your browser, nothing uploaded.
Open tool →Random String Generator
Generate random strings free with NToolHub. Custom charsets, hex mode and bulk output with secure randomness — 100% in your browser, nothing uploaded.
Open tool →UUID Generator
Generate version 4 UUIDs instantly with NToolHub’s free tool. Cryptographically random, bulk mode, uppercase option — 100% private.
Open tool →Secure Token Generator
Generate secure random tokens free with NToolHub. API keys and session IDs in hex, Base64 or URL-safe form — 100% in your browser, nothing uploaded.
Open tool →Password Strength Checker
Test your password strength free with NToolHub. Entropy scoring, common-password detection and crack-time estimates — analyzed 100% in your browser.
Open tool →