Random Number Generator

 
Common ranges

Generates an integer from 1 to 100, inclusive.

Generated locally in your browser.

Why is this truly random?

This generator uses secure browser randomness, the same cryptographic engine that secures HTTPS connections. Unlike Math.random(), which relies on a predictable pseudorandom algorithm, the values here are drawn from entropy your operating system collects from physical sources.

Results are mapped to your range with rejection sampling rather than a plain modulo, so no value in the range is any more likely than another. Both endpoints are included — a range of 10 to 12 can produce 10, 11, or 12.

Probability distribution

Every value in your range has exactly the same chance of being selected — a discrete uniform distribution. For the range you have entered:

P(x) = 1/100 ≈ 1.00%

Over many generations each value appears about equally often. Widen the range and any individual result becomes correspondingly less likely, but the distribution stays flat.

How it works

  1. Your browser generates a cryptographically secure 32-bit unsigned integer
  2. Values that would bias the result are rejected and redrawn, then the remainder is mapped onto your range
  3. The result is displayed instantly — no server request needed

Everything runs locally. Generated numbers stay in your browser and are not stored by Rangdom.

True random vs. pseudorandom

Rangdom (secure randomness)Math.random()
Entropy sourceOS-level hardware noiseAlgorithmic seed
Predictable?NoYes, if seed is known
Suitable for securityYesNo
Uniform distributionYesApproximately

Sources of entropy

Operating systems collect unpredictability from physical processes rather than arithmetic: thermal noise in electronic circuits, clock jitter, interrupt timing, and variation in input devices. Those measurements feed the entropy pool that browsers draw from.

Because the source is physical rather than algorithmic, there is no seed to recover and no sequence to reproduce. That is the property that makes the output suitable for passwords and tokens, not just for games.

A brief history of random number generation

Early statistical work relied on physical devices and published tables — RAND's 1955 volume A Million Random Digits with 100,000 Normal Deviates was produced with an electronic roulette wheel and used for decades. Computers replaced tables with pseudorandom algorithms, which are fast and reproducible but entirely determined by their seed.

Modern cryptographic applications demanded something better. Browsers now provide direct access to the operating system's cryptographic random number generator, bringing genuine unpredictability to web applications without a server round trip.

The gambler's fallacy

A number appearing several times in a row does not make it less likely next time, and a number that has not appeared is not “due”. Each generation is independent: the generator has no memory of previous results.

The probability of any particular value is always 1 divided by the size of your range, regardless of what came before. This independence is a defining property of true randomness and is guaranteed by how the values are generated.

Frequently asked questions

Is every number equally likely?

Yes. Every value in the range you set has an identical chance on every generation, and both endpoints are included.

Can I get the same number twice in a row?

Yes. Repeats are expected in genuinely random output — a sequence that never repeated would itself be a sign of bias.

Can I link to a specific range?

Yes. Append the range to the URL as query parameters — for example /number?min=1&max=6 for a six-sided range — and the generator opens preset to it.

Can I use this for lottery numbers?

You can generate repeatedly, but each draw is independent and may repeat. For a set of distinct numbers use the unique set generator instead.

Use cases

  • Choose a winner from a numbered list or raffle
  • Pick a random page, seat, ticket, or order number
  • Roll a die by setting the range to 1–6
  • Create sample data for testing and prototyping
  • Demonstrate uniform distributions in a classroom
  • Draw a random sample from a numbered population