Generate random integers, decimals, dice rolls, coin flips, and list picks with cryptographic randomness. Supports unique values, sorting, and statistics.
Uses crypto.getRandomValues with rejection sampling, so every value is uniformly distributed. For keys, passwords or security tokens use a dedicated password generator.
Result Copied
—
Click Generate to start
Count
0
Min
-
Max
-
Sum
-
Avg
-
History
No saved sets yet. Generate numbers and click «Save to history».
Questions and answers
True random numbers come from a physical source of entropy (radioactive decay, thermal noise, atmospheric fluctuation). Pseudo-random numbers are produced by a deterministic algorithm that only looks random. This tool uses the browser crypto API, which is a cryptographically secure pseudo-random generator (CSPRNG) seeded from operating-system entropy. For dice rolls, lotteries, shuffles and contest draws the output is statistically indistinguishable from true randomness.
A naive pattern like Math.floor(Math.random() * (max - min + 1)) + min is biased when the range does not evenly divide the generator’s output space. This calculator uses rejection sampling: it requests a 32-bit unsigned value from crypto.getRandomValues and discards any value that falls outside the largest multiple of the range. The result is a perfectly uniform distribution over the requested interval.
The randomness source itself is cryptographically secure, but a web page is not the right place to generate production keys or long-term passwords. For account passwords use a password manager. For application keys use server-side tooling such as OpenSSL or your language’s secure random library. This generator is intended for games, raffles, simulations, teaching and sampling.
Unique mode guarantees no repeats, so the number of values you want cannot exceed the number of integers in the range. For example, you cannot draw 20 unique values from 1-10 — there are only 10 distinct integers. When that happens the tool shows an error and asks you to widen the range or reduce the count.
No. Each call to the generator is independent. If you just rolled a 6, the probability of rolling another 6 is exactly the same as before. The gambler’s fallacy — believing that past results change future odds — is a well-known cognitive bias. History panel is there for your convenience only; it does not affect the next draw.
Integer mode supports values between approximately -9·10¹⁵ and 9·10¹⁵ (JavaScript safe integers). The practical limit is 1000 generated numbers per call to keep the page responsive. Decimal mode works across the full 64-bit double range with 0 to 10 decimal places. For bigger batches generate several times and combine the history exports.
Results are produced locally in your browser. No data is sent to a server.
This random number generator produces uniformly distributed values using the browser crypto API with rejection sampling, so every outcome has exactly the same probability. Five generator modes are built in. The Integer mode draws whole numbers from a custom range with optional unique and sorted output. Try lottery 6/49: set min 1, max 49, count 6, enable Unique and Sort — the tool returns six distinct numbers ready to play. The Decimal mode produces floating-point values with 0 to 10 decimal places, useful for simulations and data sampling. List Pick shuffles your own entries, for example picking one of seven weekday names for a schedule. Dice mode supports d4 through d100, and Coin mode flips any number of coins with heads/tails statistics. Saved sets live in the history panel, and every result can be copied with one click.