HandyHex.Handy tools in every shape.

About the Random Number Generator

The Random Number Generator picks a whole number between a minimum and a maximum you choose, both included. Use it for giveaways, games, classroom draws or deciding who goes first.

Numbers are drawn with the browser's cryptographic random generator, with a correction that keeps every value equally likely. Decimals in the limits are rounded inward.

How to use it

  1. Enter the Minimum and Maximum.
  2. Press Generate.
  3. Press again for a new number.

Fair draws

Teachers use it to pick a student number, game hosts to choose a round, and developers to produce test values. For a quick dice roll enter 1 and 6; for a coin flip enter 0 and 1 and decide in advance which side is which.

For a prize draw, number your entrants and publish the range before drawing.

Each press is independent, so the same number can appear twice in a row.

The maximum must be at least the minimum, otherwise you will see a message.

Real-world examples

Dice or coin. Range 1 to 6 for a die; 0 to 1 for a coin.

Draws. Number your entries 1 to 250 and generate a winner.

Classroom. Pick a student number or a question number.

Common mistakes

Expecting different numbers every time: repeats are possible and normal. Using a maximum lower than the minimum shows an error. Using it for regulated lotteries or security keys; use the Password Generator for secrets.

How it works

A random 32-bit value is drawn from the browser's cryptographic generator. Values in the final partial block are rejected so that every number in your range has exactly the same probability, and the accepted value is mapped onto your range with a remainder operation.

Frequently asked questions

Are both limits included?

Yes.

Can I get several numbers?

Press Generate repeatedly.

Is it suitable for lotteries?

Do not rely on it for regulated games.

Related tools

Guides