Skip to content

Random Number Generator 1-20

Get a random number from 1 to 20.

Loading the random number generator 1-20… If nothing appears, please turn on JavaScript.

This random number generator picks a whole number from 1 to 20. Every number has the same 5% chance, which makes it a fair virtual 20-sided die for tabletop games, as well as a quick way to pick a student, a page or a winner.

How to use the number generator 1-20

  1. Press Pick a number (or the spacebar).
  2. Pick several at once by changing how many numbers you want under Options.
  3. Keep “No duplicates” on so each number appears only once per draw.
  4. Sort the results from lowest to highest if you are drawing several.

When to use it

  • Tabletop role-playing games: roll a d20 for attacks, checks and saving throws.
  • Classrooms: most classes have about 20 students, so give everyone a number.
  • Twenty questions: pick which question to ask next.
  • Quizzes: choose one of twenty quiz questions at random.
  • Fitness: pick a number of push-ups, squats or seconds.

Keep, copy and share your numbers

Every result has a lock button. Locked results stay put when you generate again, so you can keep the numbers you like and reroll the rest. The history panel keeps your earlier results, and the back arrow takes you to the previous set if you generated one time too many. Press Wheel to put the current results on a spinning wheel and pick one with a bit of drama.

Use Copy to copy the results as a plain list, CSV or JSON, or download them as a file. Share copies a link that shows exactly the same results to whoever opens it, which is handy for games, classes and group chats.

Rolling a d20

The twenty-sided die is the most famous die in tabletop gaming. On a fair d20, rolling a 20 (often a “natural 20”) happens 5% of the time, and so does rolling a 1. To roll with advantage, generate two numbers with “No duplicates” off and keep the higher one; for disadvantage, keep the lower. Sorting results from highest first makes this quicker.

Drawing without repeats

With “No duplicates” on, each number in a single draw is different, just like pulling slips from a hat. To keep going over several rounds without repeats, turn on “Exclude already shown”: the generator then works through every number before any comes up again. Need a different range? Change the lowest and highest numbers under Options, or use the main random number generator.

How the randomness works

Every result comes from your browser’s built-in cryptographic random number generator (crypto.getRandomValues). We use rejection sampling, so every item has exactly the same chance of being picked, with no bias toward the start or end of the list. Nothing is sent to a server, and share links store the exact results so the person you send them to sees the same thing.

Frequently asked questions

Is this the same as rolling a 20-sided die?

Yes. Each number from 1 to 20 has the same 5% chance.

How do I roll with advantage?

Generate two numbers with "No duplicates" off and keep the higher one.

What are the odds of rolling a 20?

1 in 20, or 5%.

Can I put 1 to 20 in a random order?

Yes. Ask for 20 numbers with "No duplicates" on.

Can I change the range?

Yes. Change the lowest and highest numbers under Options.

Is the random number generator 1-20 free?

Yes. It is free, with no sign-up.