Skip to content
RandomVal

Browse all tools

Random Number Generator With Names

The random number generator with names gives every name on your list its own number, with no number used twice. Paste your names, one per line, and press Assign numbers; the numbers start at 1 unless you set another start.

Updated

How to assign random numbers to names

  1. The names are read one per line. Empty lines are ignored.
  2. The tool writes down one number per name: with six names and a first number of 1, that is 1, 2, 3, 4, 5, 6.
  3. Those numbers are shuffled with the Fisher–Yates method, using the browser's cryptographic random generator.
  4. The first name gets the first shuffled number, the second name the second, and so on.

The result is a random permutation: every possible way of handing out the numbers is equally likely. With six names there are 720 of them.

The random source is the same one used across the site, described in how our randomness works. To see the names in a shuffled list without numbers, use the random order generator.

Bar chart of 60,000 runs of the random number generator with names on six names: each name received number 1 between 9,841 and 10,075 times, against 10,000 expected.
The first name on the list has no head start: the numbers are shuffled before they are handed out.

Example: a speaking order for six talks

Six people sign up for five-minute talks and need a speaking order. After pressing Assign numbers:

NumberName
1Dara
2Ali
3Fatima
4Chen
5Beatriz
6Eli

Dara speaks first and Eli last. For raffle tickets, set the first number to match your ticket roll, for example 101, and the names receive 101 to 106. To then draw a single winner from the names, use the random winner generator.

Questions about the random number generator with names

Can two names get the same number?

No. The tool takes exactly as many consecutive numbers as there are names, shuffles those numbers and hands them out one by one. Every number is used once.

Is this the same as shuffling the list?

The result carries the same information: sorted by number, it is the list in a random order. Showing it as numbers is handier when the number itself matters, such as a raffle ticket, a seat or a turn number.

How do I pick a winner from the numbered list?

Agree beforehand that number 1 wins, or draw a number in the random number generator with the same range. To pick a name directly, spin the wheel.

Are the names stored?

Only in your browser's local storage, so the list is there when you come back. Nothing is uploaded.

Sources