Random Number Generator
Generate integers in a range, with or without duplicates.
Loading tool…
About this tool
Draws random integers in a range from the platform CSPRNG rather than Math.random, with an option to guarantee no repeats.
Limitations
- Uses rejection sampling over Web Crypto output so the distribution stays uniform across the range.
Questions
- Why not Math.random?
- It is fast but not cryptographically secure, and its output is predictable from prior values. For anything resembling a secret, a draw must come from the CSPRNG.
Privacy
This page does its work in your browser. What you paste is processed by JavaScript running on your own device and is never sent to a DevToolery server — there is no server that could receive it. The page itself is a static file delivered by a CDN. See exactly what is stored.