Numbers

Random Number Generator

Generate one unbiased random integer between a minimum and maximum you choose. Powered by your browser's cryptographic random source, not a predictable pseudo-random formula.

Cryptographically secure Instant, in your browser Free, no sign-up

Generate

Your result will appear here

How the Random Number Generator works

A random number generator produces a value that cannot be reasonably predicted before it appears. This tool draws from the Web Crypto API's getRandomValues(), the same source browsers use for security-sensitive operations, then applies rejection sampling so every integer in your range has exactly equal odds of appearing — including ranges that aren't a clean power of two.

That last detail matters more than it sounds. A naive Math.random() % range implementation quietly favours the lower end of a range whenever the range doesn't divide evenly into the generator's output space. Xrandom discards out-of-bounds draws instead of wrapping them, so a 1–37 draw is exactly as fair as a 1–32 draw.

How to use it

1
Set your rangeEnter a minimum and maximum value — negative numbers, large ranges, and single-digit ranges all work.
2
Press GenerateXrandom draws one unbiased integer from that range using your browser's crypto module.
3
Copy or rerollCopy the result to your clipboard, or press Generate again for a fresh number.

Frequently asked questions

Is this truly random or just pseudo-random?

It uses your browser's cryptographically secure pseudo-random number generator (CSPRNG), seeded from operating-system entropy such as hardware noise and timing jitter. It is suitable for lotteries, giveaways, and games — though for scientific or regulatory work requiring certified hardware entropy, you may want a dedicated hardware RNG.

Can I generate negative numbers?

Yes. Set the minimum to a negative value, for example −50, and the maximum to any higher number.

Does it ever repeat the same number twice in a row?

Yes, and that's correct behaviour. Each generation is independent, so repeats are expected roughly as often as probability predicts for your range size.

Can I generate more than one number at once?

For multiple numbers, unique or not, use the Random Number List generator, which is built specifically for that.