Random Number 1–100 Generator

 
Generated using the Web Crypto API for cryptographically secure randomness.

Why is this truly random?

This generator uses the Web Crypto API, the same cryptographic engine that secures HTTPS connections and encrypts your passwords. Unlike Math.random(), which relies on a predictable pseudorandom algorithm, crypto.getRandomValues() draws entropy from your operating system — hardware noise, interrupt timing, and other unpredictable physical sources.

The result is a number that is statistically uniform and cryptographically secure, meaning no one can predict the next value even if they know every previous one.

Use cases

  • Generate a random percentage (interpret the number as a percent)
  • Pick a raffle or lottery winner from up to 100 participants
  • Assign random seat numbers or jersey numbers
  • Create random test scores or sample data for prototyping
  • Choose a random page from a book
  • Select a random year within the last century (1924–2024)

How it works

  1. Your browser generates a cryptographically secure 32-bit unsigned integer
  2. The integer is mapped to the range 1–100 using modular arithmetic
  3. The result is displayed instantly — no server request needed

Everything runs locally in your browser. No data is sent to any server, and no numbers are stored or logged.

Frequently asked questions

Is every number equally likely?

Yes. Each number from 1 to 100 has an equal 1% chance of appearing on every generation.

Can I get the same number twice in a row?

Yes — true randomness means any number can appear regardless of previous results. The probability of getting the same number twice consecutively is 1%, which is uncommon but perfectly normal.

How is this different from the 1–10 generator?

The only difference is the range. Both use the same cryptographically secure method. The 1–100 range gives you 10 times more possible outcomes, making each individual result less predictable.

Can I use this for lottery numbers?

This generator produces a single number between 1 and 100. For multi-number lottery picks, you can generate multiple times. Each generation is independent and cryptographically secure.

True random vs. pseudorandom

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

Probability distribution

Each number from 1 to 100 has an exactly equal probability of being selected. This is known as a discrete uniform distribution. The probability of any single outcome is:

P(x) = 1/100 = 0.01 = 1%

Over a large number of generations, each number will appear approximately the same number of times. For example, in 100,000 generations you would expect each number to appear roughly 1,000 times, with small statistical variations.

Common scenarios

Raffles and giveaways

Assign each participant a number from 1 to 100 and use this generator to pick the winner. The cryptographic randomness ensures no one can predict or manipulate the outcome.

Probability and statistics

Students and researchers can use this to generate sample data, demonstrate uniform distributions, or run Monte Carlo simulations with a small, manageable range.

Games and tabletop RPGs

A d100 (percentile die) is a staple in many tabletop role-playing games. This generator replaces physical percentile dice with a perfectly fair digital alternative.

Random sampling

When you need to select items from a list of up to 100 entries — survey respondents, inventory items, or test cases — this tool gives you an unbiased selection every time.

Privacy and security

Your generated numbers never leave your device. This tool runs entirely in your browser using client-side JavaScript — no API calls, no server logs, no cookies, and no tracking of generated values. The source code is fully transparent and can be inspected in your browser's developer tools.

What is randomness?

A random number is one drawn from a set of possible values, each of which is equally probable. Crucially, each draw must be statistically independent — the outcome of one generation must have no influence on the next. This property is what separates genuine randomness from patterns that merely look random.

Humans are notoriously bad at recognizing true randomness. We tend to see patterns where none exist (a phenomenon called apophenia) and expect random sequences to "look random" — for example, we find it surprising when a coin lands heads five times in a row, even though this is perfectly normal in a truly random process.

Sources of entropy

Entropy is the raw unpredictability that fuels random number generation. Different systems harvest entropy from different sources:

Hardware noise

Thermal noise in electronic circuits, clock jitter, and voltage fluctuations. This is what most operating systems use, including the entropy pool behind the Web Crypto API.

Atmospheric noise

Radio static from thunderstorms and electromagnetic interference. Services like RANDOM.ORG use this approach, capturing atmospheric noise via radio receivers.

Radioactive decay

The timing of individual atomic decay events is fundamentally unpredictable according to quantum mechanics. Some dedicated hardware RNGs use Geiger counters for this purpose.

User input

Mouse movements, keystroke timings, and touchscreen interactions contribute to the OS entropy pool. The precise microsecond timing of these events is unpredictable enough to be useful.

A brief history of random number generation

The need for random numbers is ancient. Dice dating back to 3000 BCE have been found in archaeological sites across Mesopotamia. For millennia, physical objects — dice, coins, shuffled cards, drawn lots — were the only way to generate random outcomes.

In 1927, statistician Leonard Tippett published the first table of random numbers, derived from census data. In 1947, the RAND Corporation produced a landmark book, A Million Random Digits, generated using an electronic roulette wheel — one of the first machine-generated random number tables.

The rise of computers brought pseudorandom number generators (PRNGs). John von Neumann proposed the middle-square method in 1949, and linear congruential generators followed in the 1960s. These algorithms produce sequences that appear random but are entirely deterministic.

Modern cryptographic applications demanded something better. The Web Crypto API, standardized by the W3C, gives browsers access to the operating system's cryptographic random number generator — bringing true unpredictability to web applications without requiring any external service.

The gambler's fallacy

One of the most common misconceptions about randomness is the belief that past outcomes influence future ones. If this generator produces 42 three times in a row, many people feel that 42 is "due" to not appear — or conversely, that it's on a "hot streak." Neither is true.

Each generation is completely independent. The generator has no memory of previous results. The probability of getting 42 is always exactly 1%, regardless of what came before. This independence is a defining property of true randomness and is mathematically guaranteed by the Web Crypto API's design.

Statistical independence explained

Two events are statistically independent when the occurrence of one does not affect the probability of the other. For this generator, that means:

P(next = 42) = 1%P(next = 42 | previous = 42) = 1%P(next = 42 | previous three = 42) = 1%

No matter what sequence of numbers has appeared before, the next number is always drawn from a fresh, uniform distribution. This is in contrast to shuffling a deck of cards, where drawing one card changes the probabilities of all remaining draws.