Experimental

Random Number Generator

Generate random numbers in any range, with or without duplicates, using the browser's cryptographic random source.

?

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

Two kinds of random, and the difference matters

A pseudo-random generator produces a deterministic sequence from a seed. It is fast, repeatable and completely adequate for a game, a simulation or shuffling a playlist. A cryptographically secure generator produces output that cannot be predicted even given everything before it, which is what you need for anything where someone benefits from guessing: a prize draw, a token, a password. This tool uses the browser's crypto source, so it is safe for both.

Modulo bias

The obvious way to force a random number into a range is to take the remainder after dividing. That skews the result: if the generator produces 0 to 255 and you want 1 to 10, the values 1 to 6 come up slightly more often than 7 to 10, because 256 does not divide evenly. The bias is small and completely real, and the fix is rejection sampling, discarding values that fall outside a clean multiple of the range. Any generator used for a draw should do this.

With or without duplicates

Drawing a lottery is sampling without replacement: each number appears once. Rolling dice repeatedly is sampling with replacement, where repeats are expected. Choosing the wrong mode is the most common error, and the symptom is a lottery draw that produces the same number twice, which invalidates it.

Random does not mean evenly spread

Genuine randomness clumps. In a hundred coin flips, a run of six heads is more likely than not, and people reading that run assume the generator is broken. Sequences that look evenly distributed are usually the ones that have been tampered with. Expect clustering, and do not correct for it.

Verifiability for prize draws

For anything where a participant might dispute the result, a random number alone is not enough: nobody can check it. Provable-fairness approaches publish a commitment to a seed before the draw and reveal it after, so the outcome can be verified independently. If the draw matters, the audit trail matters more than the entropy source.

Frequently Asked Questions

Privacy & Security

Generated locally in browser.

Data: None
Client-side-Side
Active
v1.0

About This Tool

This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started β€” no registration or login required.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.