Random Number Generator
Generate random integers in a range with or without repeats, sorted or not, and roll dice in NdS+M notation, using the browser's cryptographically secure generator.
Free · No sign-up · Your inputs stay in your browser
Input
Generate random numbers
Output
Press Generate
Drawn from crypto.getRandomValues, the browser's cryptographically secure generator, with rejection sampling so every value in the range is equally likely; the common Math.floor(Math.random() * n) is neither secure nor, for large ranges, uniform. Good enough for giveaways and test data; a public lottery needs an auditable source.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Math.random is not enough
Math.random is a fast, predictable generator meant for animations and simulations; its output can be reconstructed from a few samples. The common Math.floor(Math.random() * n) is also slightly biased for large n. For draws people might contest, such as giveaways, or for anything security-related, a CSPRNG with unbiased sampling is the right tool. The getRandomValues documentation describes the API.
Auditable draws
For a public lottery or a draw with stakes, a result nobody can verify after the fact is not enough. Publish the method in advance and use a verifiable source such as a public randomness beacon.