Number generators for every situation: plain draws, ordered sequences, reproducible seeded output, cryptographically secure values, booleans and binary strings. Each one states which random source it used, and everything is generated in your browser.
Your favourites
Recently used
- Random Number GeneratorGenerate random numbers in any range, instantly and in your browser.
- Random Number Sequence GeneratorGenerate an ordered sequence of numbers with a chosen start, step and length, then shuffle it or keep it in order.
- Seeded Random Number GeneratorGenerate numbers that anyone can reproduce from the same seed.
- Secure Random Number GeneratorGenerate numbers from your browser's cryptographic random source with no way to weaken it — this tool deliberately offers no seeded or fast mode.
- Random Boolean GeneratorGenerate random true/false values for test data, feature flags and simulations, with control over how often true comes up.
- Random Binary GeneratorGenerate random binary strings of any length, with the decimal value shown alongside.
Frequently asked questions
Which number generator should I use?
The general random number generator covers most needs. Use the seeded one when a draw has to be reproducible by somebody else, the secure one when the value must be unguessable, the sequence generator when you want even coverage of a range rather than independent draws, and the boolean or binary tools when you need true/false values or bit patterns.
What is the difference between the seeded and secure generators?
The seeded generator produces the same numbers every time from the same seed, which makes a draw checkable. The secure one produces numbers nobody can predict, which makes it suitable for anything that has to stay unguessable. Those properties are opposites, which is why they are separate tools rather than a switch.
Do these tools use Math.random?
Not by default. Every tool draws from crypto.getRandomValues, the browser's cryptographic random source, unless you explicitly choose fast mode. Where a browser has no Web Crypto API at all, the tools fall back to Math.random and say so on the result.
What is rejection sampling and why does it matter?
It is how a random value is mapped onto your range without bias. Using the remainder operator makes the lowest values slightly more likely whenever the range does not divide evenly into the generator's output. Rejection sampling discards those values and redraws, so every number in your range is equally likely.
Can I reproduce a result later?
Yes, in seeded mode. The same seed and settings always produce the same output, on any device. That is what makes a published draw verifiable and a failing test reproducible.
Are the numbers stored anywhere?
No. Everything is generated in your browser and nothing is uploaded, stored or logged.
Why do random numbers repeat so often?
Because independent draws have no memory. Ten draws from 1 to 10 will usually contain duplicates, and that is correct behaviour rather than a fault. If you need every value to differ, turn on the no-repeats option, which samples without replacement instead.
One engine, several jobs
Every generator on this page draws from the same core: crypto.getRandomValues, the cryptographically strong random source built into your browser, mapped onto the range you need with rejection sampling so no value is favoured over another.
What separates the tools is not the randomness but the job. A draw that must be unguessable and a draw that must be reproducible are opposite requirements, and a tool that tried to be both would be worse at each. Keeping them apart means each page can be built entirely around one purpose.
Independent draws versus sequences
Asking for ten numbers between 1 and 100 gives ten independent values. They will cluster and leave gaps, which is what independence looks like and what people consistently find surprising.
A sequence answers a different question: give me values that cover this range evenly. Start at 1 with a step of 10 and every band is represented exactly once. Shuffling that sequence afterwards keeps the coverage while making the order unpredictable, which is the basis of systematic sampling.
Neither is more random than the other. They model different situations, and picking the wrong one produces results that look reasonable and answer the wrong question.
Reproducible or unpredictable — pick one
The seeded generator uses a documented algorithm, xoshiro128** seeded through splitmix32, so the same seed produces the same numbers on any device. That makes a published draw checkable by anyone and a failing test reproducible by any developer.
It also makes the output predictable to anyone holding the seed, which is why the secure generator deliberately offers no seeded mode at all. A page whose subject is unpredictability should not ship a control that quietly removes it.
The bias nobody sees
Mapping a random value onto a range by taking the remainder is the obvious approach and it is subtly wrong. Unless the range divides evenly into the generator’s output space, the leftover values wrap onto the lowest results, which therefore appear slightly more often.
For a small range the effect is tiny. For a large one it is measurable, and in a draw with anything at stake, measurable is enough to matter. Every tool here uses rejection sampling instead — values in the leftover region are discarded and redrawn — at the cost of a negligible number of extra draws.
Repeats are not a fault
Independent draws repeat. Ask for ten numbers between 1 and 10 and duplicates are the norm, not a bug. The same intuition failure explains why people mistrust shuffled playlists that play the same artist twice.
Where every value must differ, the no-repeats option samples without replacement, which is a genuinely different operation with different odds — and one the tools refuse to fake by drawing and retrying, because that degrades badly as the pool empties.
Privacy
Every tool on this page runs entirely in your browser. Nothing generated here is uploaded, stored, logged or written into the page link.
Which tool for which question
The choice is usually settled by one question: does anybody else need to be able to check this result?
If yes, use the seeded generator and publish the seed. If the result must be unguessable instead, use the secure generator, which offers no seeded mode precisely so that it cannot be weakened by accident. If the requirement is even coverage of a range rather than independent values, use the sequence generator. If the output is a true/false flag or a bit pattern, the boolean and binary tools produce them in the formats code actually expects.
The general random number generator covers everything else, and is the right default when none of those specific requirements apply.