EVERYDAY / BROWSER TOOL

Random number generator

Pick a random integer in an inclusive range.

Processed on your device · no account needed
Your inputStays on your device
Enter minimum and maximum separated by a comma. Range must fit 32 bits.
Result

Your result will appear here.

Enter your input, then run the tool.

How to use the random number generator

Draw a number for a raffle, a game or a decision. The generator uses your browser’s secure random source and avoids the bias that simple methods introduce.

Enter the minimum and maximum separated by a comma, for example 1, 100, and run the tool. Run it again for another draw.

  1. The Input box starts with 1, 100. Replace it with your minimum and maximum, separated by a comma.
  2. Press Run tool to draw one number.
  3. Press Run tool again for each further draw.

Good to know

  • Both limits are included in the possible results.
  • Limits must be whole numbers; negative numbers are fine. The range may span up to about 4.29 billion values.
  • Each draw uses crypto.getRandomValues with rejection sampling, so every number in the range is equally likely.
  • One number per run; nothing is remembered between runs.
  • Everything is calculated in your browser; nothing you type is sent to HandyTechHelper.

Examples

  • 1, 6 works like rolling a die.
  • For a raffle with tickets 1 to 250, enter 1, 250 and read the winning ticket.
  • -10, 10 can return any whole number from −10 to 10, including 0.

If something goes wrong

“Enter two finite numbers separated by a comma.”

Use a comma, not a dash or words: 1, 100 rather than 1-100 or 1 to 100.

“Enter an ordered integer range spanning fewer than 2³² values.”

Put the smaller number first (1, 100, not 100, 1), use whole numbers only, and keep the range under about 4.29 billion values.

Questions

Is it truly random?

It uses the browser’s cryptographically secure generator, which is suitable for fair draws. It is not a certified lottery system.

Can I get several numbers at once?

Run the tool again for each draw. The random number generator page can list up to 100 numbers.

Can the same number come up twice?

Yes. Every draw is independent, like rolling dice.

How do I pick a winner from a list of names?

Number the names from 1, enter 1 and the number of names, and pick the name with the number drawn.

Next steps: UUID generator · Strong password generator · Percentage calculator

Keep going