🔒 Processed locally in your browser — no data uploaded
← Back to Home

Random Number Generator

Random number settings
Result

What the Random Number Generator does

Set a lower bound, an upper bound and how many values you want, then press Generate. Integer mode returns whole numbers including both endpoints, so a range from 1 to 100 can produce 1 and it can produce 100. Decimal mode returns values spread across the interval, written to four decimal places, and the results appear as a comma-separated list or as a single figure.

The page pulls randomness from crypto.getRandomValues rather than Math.random, and prints a caption under the result restating the mode, the exact range and the source. You can ask for between one and one hundred values, and anything outside that band is clamped to the nearest limit. Nothing is stored, so reloading returns the form to its defaults of 1 to 100, one value, integer mode.

How to use it

  1. Set the lower boundType the smallest acceptable value in the first box. Decimals are accepted here, and an empty field is treated as zero, which is harmless when your range is meant to start there anyway.
  2. Set the upper boundFill in the largest value you want. It has to be strictly greater than the lower bound, or the tool refuses the request and prints an error in place of any numbers.
  3. Choose count and modeEnter how many values you need, up to one hundred, and tick the decimal box for fractional results. Leave it unticked when you are drawing, seating or assigning whole items to people.
  4. Generate and copyPress Generate for a fresh draw each time, then select the output line to reuse it. There is no export button, so paste the list where it belongs before you navigate away.

Options and formats

Inclusive integer rangeWhole numbers span from the minimum to the maximum with both ends reachable, so a 1 to 6 setting behaves like a die rather than offering only five possible outcomes.
Decimal modeTicked, the generator returns fractions across the interval with four decimal places kept. That suits sampling coordinates, probabilities and simulated measurements far better than it suits counting.
Batches up to one hundredThe count field holds anywhere from one to a hundred values and prints them in a single comma-separated line, which is handy for filling a column or running a quick simulation by hand.
Source captionA small line under the result restates the mode, the exact range and the crypto.getRandomValues origin, useful when a screenshot of the run needs to explain itself to someone else.

Things to watch out for

No uniqueness guaranteeValues are drawn independently, so repeats are entirely normal and a batch of ten from 1 to 6 will usually contain duplicates. There is no switch that forces distinct numbers for a draw.
Boundaries must be in orderSetting the minimum equal to or above the maximum stops the run and shows an error instead of results. Swap the two values, or widen the range, whenever that message appears.
Not a lottery-grade drawThe scaling step maps a 32 bit random value onto your range, which leaves a tiny unevenness and produces no verifiable audit trail. Public draws with prizes need a certified process instead.
Nothing is savedRefreshing the page discards the numbers on screen and resets the fields to their starting values. Copy the output somewhere safe before you leave if the result is going to matter afterwards.

Frequently asked questions

Can I reproduce the same sequence again?

Not deliberately. There is no seed field, and every press draws new values from the browser's random source, so writing a sequence down and expecting it back is not possible. Record what you got if a result has to stand.

Is this good enough for picking a winner?

For a friendly draw, yes. For anything involving money, prizes or a compliance requirement, use a process the participants can verify for themselves, because nothing here produces a tamper-evident record of the draw for anyone else to review afterwards, so keep that in mind.

Why did I get 100 when my range was 1 to 100?

Integer mode includes both endpoints of the range. The maximum is a valid outcome, just as the minimum is. Set the upper bound to 99 whenever you want a top value of one hundred excluded from the draw altogether, and the change takes effect at once.

Do decimal results ever land on the exact maximum?

Reaching the top of the range depends on the random value hitting its own ceiling, which is possible but extremely rare. In ordinary use the returned decimals sit somewhere inside the interval rather than exactly on either of its two ends.

How is this different from Math.random?

Math.random uses a lighter generator with a smaller internal state. This page reads from crypto.getRandomValues, the browser's stronger source, which is exactly why the caption printed under the result names that particular call in every run that it reports back to you.

Can I generate dates, dice rolls or names?

Only numbers, but dates and dice map onto it easily: use a whole-number range for days since a chosen start date, or 1 to 6 for a single die. Names need a different approach that works from a list you supply.