Browser tool
Random Number Generator 1-100 | FPSDEN
Generate exact random integers with the number generator 1-100 range preset, by digit count, or any custom min/max with optional no repeats in a batch.
Random Number Generator (1–100)
Choose numbers
Range preset 1–4 1–5 1–6 1–7 1–8 1–15 1–20 1–30 1–50 1–100 1–1000
Mode Use range or digit count, not both.
Range Digits
Minimum Integer; up to 17 characters including a minus sign.
Maximum Must be at least the minimum.
Digits Whole number 1–16; this is used only in Digits mode.
Quantity Whole number 1–100.
No repeats Prevent repeated numbers within this batch.
Endpoints are included. No repeats applies only within this batch. Digits mode gives positive integers without leading zeros. Results remain exact through 16 digits.
Generate Your numbers will appear here.
Copy result One dot per drawn number, placed on the range you asked for.
min <= each value <= max
Recent draws
The last five finished batches stay in this tab while you work, newest first. Nothing is stored on a server, and closing the tab clears the list.
No draws yet — generate a batch and it appears here.
Draw whole integers in the browser: pick a range up to 1–1000, a digit count, or a preset. One to 100 values per batch, endpoints included, optional no repeats.
Range, digits and no repeats
Range mode includes both endpoints, so 1–100 has 100 possible values and -5 to 5 has 11. Bounds may be negative, and each one accepts up to 17 characters, which covers every integer from -9999999999999999 to 9999999999999999. Digits mode fixes a length instead: four digits means 1000–9999 and sixteen means 1000000000000000–9999999999999999, always positive and never with a leading zero. Quantity runs from 1 to 100 per batch. No repeats applies only to the batch you just generated.
How numbers are selected
The page requests random bytes from crypto.getRandomValues, then maps them onto your range. A whole number of bytes spans a power of two, which is rarely an exact multiple of your range size, so anything above the cutoff is thrown away and redrawn. On 1–100 one byte is used: values 0 to 199 map onto the 100 outcomes, two byte values each, and 200 to 255 are discarded. That rejection step is what keeps the low numbers from being over-represented. After 128 rejected attempts the draw stops and reports a failure.
Cutoffs worked out twice
A range of 1 to 1000 needs two bytes, because its size minus one is 999. Two bytes span 65,536, and 65,536 leaves a remainder of 536 when divided by 1,000, so the cutoff is 65,000 and the byte pairs from 65,000 to 65,535 are redrawn. Each of the 1,000 outcomes then has exactly 65 accepted inputs, and about 0.8 percent of draws are thrown away. Sixteen digits works the same way: that range holds 9,000,000,000,000,000 values, seven bytes span 72,057,594,037,927,936, the cutoff is 72,000,000,000,000,000, and every outcome has eight accepted inputs.
No repeats, step by step
With no repeats on, quantity 4 from 1–6 returns four different numbers, and a quantity larger than the range fails instead of looping. The tool tracks the used values with a small map, so a range in the billions never builds a list that long. Trace 1–100 with quantity 3: the first draw takes index 40 and outputs 41, while the old tail index 99 is stored at slot 40. The second draw takes index 40 again, reads 99 and outputs 100, leaving 98 in that slot. A third draw on index 40 reads 98 and outputs 99.
When the form refuses
Each rejection names a field and marks it invalid. An empty bound, a decimal point, a comma, more than 17 characters, or a number past -9999999999999999 or 9999999999999999 fails. A minimum above the maximum fails. Digit count has to be a whole number from 1 to 16 and quantity a whole number from 1 to 100, so 0 and 101 are both out. A no-repeats batch larger than the range fails. Fractions are not supported in either mode, and the digits field is ignored while range mode is selected.
Presets, edits and pressing again
Choosing a range preset sets the mode back to range, the minimum to 1 and the maximum to that preset. Typing in any field clears the last result and returns the status line to its ready message, so an old list never sits under new settings. During a draw the fields and the button are disabled and the status reads generating. When it finishes, the button label changes to generate again. The page keeps the last five batches in this tab as a plain list under the result card — nothing is stored on a server, and closing the tab clears it. Pressing again starts a fresh set of draws and pushes the newest finished batch to the top of that list.
What uniform really means
Uniform means every integer in the range had the same chance on each draw, not that a batch looks flat. On 1–100 a single draw lands at or below 50 half the time. With repeats allowed, two draws match 1 time in 100. Take 1–6 with quantity 4: with repeats there are 6×6×6×6, or 1,296 ordered results; with no repeats there are 6×5×4×3, or 360. Small batches stay lumpy, and nothing in the code inspects an output for balance.
How the results are printed
Each value is a string built from big integers, so all sixteen digits survive and there is no floating-point rounding and no thousands separator. Negative numbers keep their minus sign. Values appear in a numbered list in the order they were drawn, one per line, and the list markers are positions rather than part of a value. Because the digits come out plain, they need no cleanup before you paste them into a cell or a script argument.
Neighbouring pages on this site
This random number generator handles whole numbers only. /random-letter-generator/ returns one uppercase A–Z letter per draw. /random-state-generator/ picks one of the 50 US states and shows its postal code. /random-number-wheel/ spins options you type yourself, one per line, with optional integer weights from 1 to 100000, so uneven odds live there rather than here. /worksheet-generator/ builds fraction exercises for grades 3, 4 and 5, up to 30 questions per sheet.
Country Wheel : Spin through the world’s countries, or weight the wheel by population, area or GDP for a single draw.
Truth or Dare Wheel : Add the names of people playing, press Spin, and let the wheel pick who answers a prompt — or write your own prompts.
Random Letter Generator : One uppercase A–Z letter per draw, for alphabet games and pick-a-letter calls.
Random State Generator : Picks one of the 50 US states and shows its postal code.
Random Number Wheel : Spins options you type yourself, one per line, with optional integer weights for uneven odds.
Worksheet Generator : Builds fraction exercises for grades 3, 4 and 5, up to 30 questions per sheet.
Frequently asked questions
What is the biggest range this tool accepts?
Both bounds must be integers from -9999999999999999 to 9999999999999999, and the minimum may not exceed the maximum. A single range can therefore hold close to 20 quadrillion values, and the arithmetic stays exact because bounds are parsed as big integers rather than floats. Batch size is a separate limit: 1 to 100 numbers per press, however wide the range is.
How do I get random numbers from 1 to 100?
The 1-100 range is the default in the form, and the range preset row also carries a 1-100 button. Pressing Generate draws whole integers between 1 and 100 inclusive; turn on no repeats if you want each number to appear at most once in that batch. The same preset pattern covers 1-1000 and every intermediate preset on this page.
How do I stop the same number appearing twice?
Turn on no repeats before you press generate. That setting covers only the current batch, so a later batch can produce the same values again. The quantity has to fit the range: asking for 7 numbers from 1–6 returns a message that the range has fewer unique numbers than requested, instead of a shortened list.
Can it produce decimals or negative numbers?
Negatives work in range mode. Type -50 and 50 as the bounds and a draw can land anywhere between them, minus sign included. Decimals do not work in either mode, because each bound is checked as a plain integer before use. If you need a decimal result, generate an integer and divide it yourself.
How do I get a six-digit code that starts with zero?
Digit mode cannot do it, because six digits means the block from 100000 to 999999 and shorter results are not padded. Switch to range mode with a minimum of 0 and a maximum of 999999, which spreads draws evenly across all 1,000,000 values, then add leading zeros in your own spreadsheet or script.
Can I see what I rolled before?
Yes — the last five finished batches stay visible under the result card while the tab stays open, newest first. The list lives only in the browser and disappears when you close the tab; nothing is sent anywhere. To keep a permanent record, copy a batch with the copy button or paste the output list into your own notes.
Why does my batch look unevenly spread?
Every draw is independent while repeats are allowed, so nothing pushes later numbers toward unused parts of the range. Ten draws from 1–100 can easily include a pair and leave most of the range untouched. Switch on no repeats if you want distinct values, or raise the quantity. The code never rebalances a finished batch.
Why do I see Could not generate a result?
That message means the draw raised an error instead of returning values. Two paths reach it: the browser does not expose crypto.getRandomValues, so the random source call fails, or one rejection sampling loop runs out of its 128 attempts. Neither path leaves partial output on the page, so check your inputs and try again.
On this page
Choose numbers
Range, digits and no repeats
How numbers are selected
Cutoffs worked out twice
No repeats, step by step
When the form refuses
Presets, edits and pressing again
What uniform really means
How the results are printed
Neighbouring pages on this site
Frequently asked questions
Related tools
Random Letter Generator Pick one uppercase English letter from A–Z.
Random State Generator Pick one of the 50 U.S. states and its postal abbreviation.
Random Number Wheel Spin editable options with optional integer weights.
Worksheet Generator Create fraction practice, handwriting sheets and a rubric to print.