Generate random numbers online in any range with a cryptographic RNG. Pick integers or decimals, unique sets, and bulk counts, computed in your browser.
Runs entirely in your browser — your data never leaves your device.
How to use Random Number Generator
What it does & when you need it
You need a random number — a dice roll for a game, a winner for a giveaway, a
sample index for a test, or a set of lottery numbers with no repeats. This tool
draws them from a cryptographically secure generator across any range you set,
as integers or decimals, one value or thousands, with an option to guarantee
every result is distinct.
It all runs in your browser. Numbers come from your device's
crypto.getRandomValues and are never transmitted or logged, so a draw stays
private and the tool keeps working with no connection.
How to use
Set Min and Max — both ends are inclusive, so 1 to 6 behaves
exactly like a die.
Set Count for how many numbers you want.
Leave Integers on for whole numbers, or turn it off to draw decimals.
Turn on Unique when no value may repeat, such as a lottery draw or picking
distinct winners.
Press Generate (or Ctrl/Cmd + Enter) and Copy the list.
Things worth knowing
Secure randomness matters more than you might think.Math.random is fast
but predictable — its internal state can be reconstructed from a handful of
outputs, which makes it unsafe for anything a person could game, like a prize
draw. This tool uses a CSPRNG seeded from operating-system entropy, and it maps
those random bits onto your range with rejection sampling, so every value is
equally likely with no bias toward the edges.
Unique has a hard limit. A set of distinct values can never be larger than
the range it is drawn from, so asking for six unique numbers between 1 and 5 is
impossible. Instead of looping forever, the tool detects this and returns a clear
error — widen the range or lower the count to resolve it.
Decimals use full double precision. With Integers off, values are drawn
using 53 random bits, giving a fine-grained, evenly spread result rather than a
few rounded steps — ideal for a random probability between 0 and 1. When you need
random strings or keys instead of numbers, the
NanoID Generator and
UUID Generator draw from the same secure source.
Examples
Roll a six-sided die
1 to 6, 1 number
A single inclusive integer between 1 and 6 — the classic dice roll.
Lottery draw, no repeats
1 to 49, 6 unique integers
Six distinct numbers with Unique on, exactly how a 6/49 lottery is drawn.
Random decimals
0 to 1, 5 decimals
Five floating-point values between 0 and 1 with the Integer option turned off.
Frequently asked questions
Is this a true random number generator?+
It is cryptographically secure rather than truly physical. Numbers come from crypto.getRandomValues, the browser's CSPRNG, which is seeded from operating-system entropy and is unpredictable in practice — far stronger than Math.random, whose internal state can be reconstructed from a few outputs. For raffles, sampling, or games this is more than sufficient.
Are the minimum and maximum both included?+
Yes. The range is inclusive on both ends, so a range of 1 to 6 can return any of 1, 2, 3, 4, 5, or 6 — exactly like a die. For integers the tool maps random bits onto the whole span with rejection sampling, so every value in the range is equally likely with no bias toward the edges.
How does the unique option work?+
With Unique enabled, no value repeats — useful for drawing lottery numbers or picking distinct winners. Because a unique set cannot be larger than the range, asking for 6 unique numbers between 1 and 5 is impossible and the tool reports an error instead of looping forever. Widen the range or lower the count to fix it.
Can it produce decimals instead of whole numbers?+
Yes. Turn off the Integer option to draw floating-point values across the range, for example a random probability between 0 and 1. Decimals use the full 53 bits of double precision, so you get a fine-grained, evenly distributed spread rather than a handful of rounded steps.
Does anything leave my browser?+
No. Every number is generated locally with no network request, so results are private and the tool works offline. Nothing you generate is logged or transmitted, which matters if the numbers seed a security test or a confidential draw.