Random Number Generator
Generate secure random numbers, flip coins, and roll dice.
This tool uses the browser's crypto.getRandomValues() API, which generates
cryptographically secure random numbers using the operating system's entropy source. This is
fundamentally different from Math.random(), which uses a deterministic
pseudo-random algorithm and is not suitable for security-sensitive applications.
Common uses: generating random samples for statistics, picking lottery numbers, running simulations, tabletop gaming, and anywhere you need unbiased, unpredictable values. The no-duplicates mode uses rejection sampling to ensure a perfectly uniform distribution across the selected range.
Link to this tool with values filled in
Everything after the # stays in your browser — it is never sent to a server — so a
link like this opens the tool ready to go without the values travelling anywhere but the address
bar:
https://crunchify.net/tools/random-number#mode=dice&sides=20&count=1
Join the settings with &, and percent-encode each value so that spaces,
newlines and any #, &, = or % inside one
do not break the link. Leave a setting out to accept its default. If a setting is not recognised,
the page says so rather than quietly ignoring it.
mode(alsotypeorwhat) — number, coin or dice, defaults tonumber. Which generator: a number in a range, coin flips, or dice rolls.min(alsofromorlow) — a number, defaults to1. Smallest value, in number mode.max(alsotoorhigh) — a number, defaults to100. Largest value, in number mode.count(alson,howmanyorq) — a whole number from 1 to 1000, defaults to1. How many values, flips or rolls to produce.integer(alsointegersorwholenumbers) — true or false, defaults totrue. Whole numbers only, in number mode. Turn off for decimals.duplicates(alsoallowduplicatesorrepeat) — true or false, defaults totrue. Allow the same value more than once. Turn off to draw without replacement — the range must then be at least as large as the count.sides(alsodie,diceord) — 4, 6, 8, 10, 12, 20 or 100, defaults to6. Which die to roll, in dice mode.
The tool reads these on arrival but never writes them back, so what you type here stays out of your browser history.
How does a random number generator work?
This tool uses the browser's crypto.getRandomValues() API, which draws from the operating system's entropy source (hardware events, timing jitter, etc.). This is cryptographically secure and unpredictable, unlike Math.random() which uses a deterministic algorithm.
What is the difference between a random number and a pseudo-random number?
A true random number comes from a physical process (hardware noise, radioactive decay). A pseudo-random number is generated by a deterministic algorithm seeded with an initial value — it looks random but is reproducible. crypto.getRandomValues() uses entropy from the OS hardware, making it suitable for security applications.
Can I generate random numbers without duplicates?
Yes — enable the "No duplicates" mode. The generator uses rejection sampling to produce a uniformly distributed set of unique values across your chosen range.
What is a fair coin flip or dice roll?
A fair coin flip is 50/50 — heads or tails equally likely. A fair six-sided die gives each face a 1/6 probability. This tool uses cryptographic randomness so each outcome is unbiased and independent of previous results.
Related Tools
Updated August 18, 2026