DoraPDF / Blog

Random Number Generator: Pick Numbers in Any Range, With or Without Repeats

By the DoraPDF team · 4 min read · Updated 2026-11-23
Random Number Generator: Pick Numbers in Any Range, With or Without Repeats

Whose turn is it to present? Which raffle ticket wins? Which question from the list goes first? Whenever a choice should be fair, a random number generator settles it without anyone being accused of picking favourites.

DoraPDF's Random Number Generator picks whole numbers between any Min and Max you set. Ask for one number or thousands, and decide whether numbers may repeat. The randomness comes from your browser's cryptographic random source, and nothing leaves your device.

How to generate random numbers

  1. Open the Random Number Generator. The defaults are Min 1, Max 100, How many 1, with No duplicates ticked, so you already have a random number between 1 and 100.
  2. Change Min and Max to your range. Both limits are included, so 1 to 6 can return 1 or 6.
  3. Set How many numbers you want (up to 10,000 at a time).
  4. Leave No duplicates ticked if each number may only appear once, or untick it to allow repeats.
  5. Press Generate ✦. The numbers appear in the Result box, separated by commas.
  6. Press Copy to paste them into a message, spreadsheet or document.

With or without repeats: which to choose?

Situation No duplicates? Why
Raffle or giveaway winners Yes One ticket can only win once.
Random order of students or speakers Yes Set How many equal to the class size to get a full shuffle.
Lottery-style picks (e.g. 6 numbers from 1 to 49) Yes Real draws do not repeat numbers.
Rolling dice No Each roll is independent, so repeats are normal.
Simulating coin flips (1 = heads, 2 = tails) No Repeats are expected.
Sample data for testing Usually no Real data contains repeats.

Practical examples

Pick a giveaway winner. Number your entries in a list (for example, comments 1 to 312). Set Min 1, Max 312, How many 1. Generate, then find the matching entry. Taking a screenshot of the result is a simple way to show followers the draw was fair.

Choose three winners. Same range, How many 3, No duplicates on. You get three different entries in the order drawn: first, second and third prize.

Shuffle a class list. If you have 28 students, set 1 to 28, How many 28 and no duplicates. The result is a random order for presentations or seating.

Roll dice. Set 1 to 6. For two dice, set How many 2 and untick No duplicates so doubles can happen.

Pick a random page or question. Set the range to the page numbers of a book or the numbers of a question bank, then study whatever comes up.

How fair is it?

The tool uses crypto.getRandomValues, the browser's cryptographically secure random number source, rather than a simple pseudo-random formula. Results cannot be predicted from earlier ones, and each press of Generate ✦ produces a fresh draw. For everyday raffles, games, classroom picks and sampling, that is more than fair enough.

For official lotteries or regulated prize draws, follow whatever rules and auditing your local law requires; a web tool is not a substitute for those.

Common problems and fixes

"Max must be ≥ min." The maximum is smaller than the minimum. Swap the two values.

"Not enough unique numbers in range." You asked for more unique numbers than exist in the range, such as 20 different numbers between 1 and 10. Widen the range, ask for fewer numbers, or allow duplicates.

I typed decimals and got whole numbers. The generator works with whole numbers only. Min is rounded up and Max is rounded down, so 1.5 to 9.5 becomes 2 to 9.

I only got 10,000 numbers. That is the limit per press, which keeps the page responsive. Generate again if you need more.

Can I get negative numbers? Yes. Set Min to a negative value, for example -50 to 50.

Privacy

Every number is generated in your browser. Nothing about your draws is uploaded or logged, so you can use it for private lists and internal decisions.

More random tools

FAQ

How do I pick a random number between 1 and 100? Open the tool and press Generate ✦. Those are the default settings.

Can I generate several random numbers at once? Yes. Set How many to any number up to 10,000.

How do I avoid repeated numbers? Keep No duplicates ticked. Every number in the result will then be different.

Are both Min and Max included? Yes. A range of 1 to 10 can return 1 and 10.

Is it good enough for a giveaway? Yes, for informal giveaways and raffles. Number your entries, draw with no duplicates, and share a screenshot of the result.

Try the tools from this guide — free

Keep reading

Guide

How to Create a Strong Password You Can Actually Remember

Make passwords that are hard to crack but easy to remember: passphrases, a simple system for many accounts, and when to let a generator do the work.

Guide

Strong Password Generator: Create Random, Secure Passwords You Can Trust

Generate strong random passwords from 6 to 64 characters, choose letters, numbers and symbols, skip look-alike characters and see the strength in bits.

Guide

How to Password Protect a PDF Before You Email It

Lock a PDF with a password before sending it by email: create a strong password, share it safely, and know what protection does and does not do.