Skip to content
AgileLogics

Random Name Picker

Randomly selects one or more names from a list you enter, one per line, without repeats (a name listed twice counts once).

How it works

Enter names, one per line, choose how many to pick, and click Generate.

How does a random name picker choose a winner?

A random name picker treats every distinct name in your list as one entry and gives each entry the same chance of being drawn. This one merges names that appear more than once, then removes each name from the pool once it's picked, so you can draw up to 20 winners without the same name coming up twice. The output lists winners in the order they were drawn.

That makes the first line of the output the first name out of the hat, which is handy when you need a ranking: first prize, second prize, and so on down the list.

Running a draw

  1. Paste your names into the input box, one per line. A column copied from a spreadsheet works as-is.
  2. Set Names to pick anywhere from 1 to 20.
  3. Click Generate. The winners appear in the output box.
  4. Click Copy to grab the result.

Every click of Generate is a fresh, independent draw. If you're running a giveaway, decide before you start that the first click counts. Clicking until you like the result turns a fair draw into a hand-picked one, and anyone watching will notice.

What counts as an entry

The picker only splits on line breaks, then tidies each line. Here is how common inputs are treated:

What you paste How it's treated
Ben with spaces around it Trimmed to Ben
Empty lines between names Ignored
Ava, Ben, Cara on a single line One entry called Ava, Ben, Cara
The same name on two lines One entry, so no extra odds
Ava and ava Two entries, because the match is case-sensitive
5 names with Names to pick set to 8 All 5 names, shuffled
Only spaces or blank lines No output

The comma case catches people out most often. If your list arrived comma-separated, swap the commas for line breaks first, or the whole list becomes a single "name" that wins every time.

Merging duplicates means nobody gets an extra chance because their name was pasted twice, and a winner never appears twice in the output. For a raffle where people bought several tickets, give each ticket its own label, such as Ben #1 and Ben #2, so every ticket is a separate entry. If you want to see which names were repeated before you draw, the duplicate line remover shows the cleaned-up list.

How fair is the draw?

Picking happens with the browser's crypto.getRandomValues(), the same cryptographically secure source used for passwords and keys. Math.random() is fine for games but isn't designed for anything that needs to be unpredictable.

Turning a random number into a position in your list has a classic trap called modulo bias. Take a random byte (0 to 255) and use the remainder after dividing by 3 to choose among three names: 256 values don't split evenly into three, so the first name gets 86 chances and the other two get 85 each. The picker avoids this with rejection sampling. It draws a 32-bit number and throws it away if it falls in the uneven tail, which leaves each entry's odds equal to within about one part in four billion.

Each winner is then removed and the next is drawn from whoever is left. With n distinct entries and k winners, every entry ends up with a k/n chance of being among the winners:

Entries Winners drawn Chance any one entry wins
10 1 10%
30 3 10%
50 5 10%
120 20 about 16.7%

Limits worth knowing

  • No history. The tool doesn't keep a record of past draws. If a giveaway needs proof, screen-record the draw or run it in front of the participants.
  • No weighting option. Repeated names are merged, so weight entries by giving each ticket a distinct label, as described above.
  • Up to 20 winners per draw. To put a whole list in random order, for example a presentation running order, use the text line shuffler instead.
  • Names stay on your device. Nothing is sent to a server, so a list of students or customers never leaves the browser tab.

Need numbered tickets instead of names? The random integer generator draws numbers from a range, and the text sorter can alphabetise the winners afterwards if you'd rather announce them A to Z.

Last updated

Frequently asked questions

Can the same name be picked twice?
No. Identical names are merged before the draw, so a name typed on two lines is still one entry, and each drawn name is removed from the pool before the next pick. The match is exact after trimming spaces, so "Alice" and "alice" count as two different names.
Is the draw truly random?
It uses crypto.getRandomValues, the browser's cryptographically secure random number generator, rather than Math.random. Indexes are chosen by rejection sampling, which keeps every entry's chance equal to within about one part in four billion.
How many names can I pick at once?
Between 1 and 20 per draw. If you ask for more names than the list contains, you get every name back in a random order.
Is my list uploaded or saved?
No. The draw happens in JavaScript on the page and makes no network request, and nothing is stored, so the list and results are gone when you close the tab.
How do I give someone more than one chance?
There's no weighting option, and repeating a name doesn't add chances because duplicates are merged. Make each ticket distinct instead, for example "Alice