Random Number Generator
Generate cryptographically secure random integers using your browser's Web Crypto API with unbiased rejection sampling — no weak Math.random() shortcuts. Everything runs locally; nothing is uploaded or stored.
How to use this random number generator
Set a minimum and maximum value (inclusive), choose how many numbers you want, and optionally check Unique values only if you need a list without duplicates — useful for lottery-style draws, sampling, or shuffled ID assignment. Click Generate to produce the list, then copy it with one click. If you request more unique values than the range can supply, the tool shows an error instead of hanging or producing incorrect output.
Why cryptographic randomness matters
Math.random() is a pseudo-random generator not designed for security-sensitive use — its output can, in principle, be predicted, and it can also introduce subtle statistical bias when combined with the modulo operator to fit a range. This tool instead uses crypto.getRandomValues(), the Web Crypto API's cryptographically secure random source, combined with rejection sampling: it discards any raw random value that would introduce range bias, guaranteeing a truly uniform distribution across your min/max range. This makes it suitable for generating lottery numbers, sampling tokens, randomized test data, or anything else where fairness and unpredictability matter.