Random Picker & Team Generator

Fairly draw winners from a list, divide people into teams, shuffle an order, or pick random numbers from a range.

Result
Choose a mode and click "Draw".

Fairness Notice ยท Random numbers are generated using the browser's built-in cryptographic random number generator (crypto.getRandomValues), and modulo bias is eliminated by rejection sampling. Shuffling uses the Fisher-Yates shuffle. The list and results are not sent to the server, and results are not stored anywhere.

What is the Random Picker & Team Generator?

Manually picking winners for a giveaway, dividing people into groups, or deciding presentation order can feel biased. This tool provides four ways to generate truly random results from a list of items. Paste your list to pick one or more winners (with or without duplicates), divide items evenly into teams, shuffle the entire list into a new order, or pick numbers from a custom range. To ensure complete fairness, it uses the browser's cryptographic random number generator (`crypto.getRandomValues`) and eliminates common biases like modulo bias through rejection sampling. Shuffling is performed with the standard, unbiased Fisher-Yates algorithm. Since all processing happens in your browser, your list of names is never sent to a server.

How to use

  1. Select a mode at the top: "๐ŸŽฏ Pick", "๐Ÿ‘ฅ Divide into Teams", "๐Ÿ”€ Shuffle Order", or "๐Ÿ”ข Number Range".
  2. Enter names or items in the "Item List" box, one per line or separated by commas.
  3. For "Pick", set the "Number to Pick". For "Divide into Teams", set the "Number of Teams". For "Number Range", set "Min", "Max", and "Number to Pick".
  4. Click the "๐ŸŽฒ Draw" button to see the results appear in the "Result" box.
  5. "Copy" the results for easy sharing or "Save" them as a .txt file. Click "Pick Again" to run a new draw with the same settings.

Random Picker & Team Generator guide

How this tool is used in real work, and what to watch out for.

Why we don't use Math.random

Most web applications that need randomness use Math.random(). For simple games or picking a color, it's perfectly fine. But for drawing winners, it has two flaws.

First, Math.random is not cryptographically secure. It uses a pseudorandom number algorithm internally, meaning its next output can be predicted if enough previous outputs are observed. Indeed, studies have successfully restored the internal state of a browser's Math.random. Second, the specification does not strictly guarantee uniformity, and implementations differ between browsers.

That's why this tool uses crypto.getRandomValues(). It pulls values from the operating system's entropy pool, making it unpredictable. It was created for the very purpose of generating cryptographic keys.

While there's no way to predict the result, since the code runs in the browser, the user themselves can always modify the code to manipulate the outcome โ€” this is true for any web-based picker. See the "Trust" section below for more on this.

Modulo Bias โ€” What Most Pickers Get Wrong

Even with good random numbers, fairness can be broken in the final step. A common method is to take a random number from 0 to 4,294,967,295 and use the remainder after dividing it by the number of participants.

The problem is that 4,294,967,296 is not always perfectly divisible by the number of participants. For example, with 3 participants, the case where the remainder is 0 occurs exactly one more time than the cases for 1 or 2. This gives the people at the beginning of the list a very slight advantage.

While the difference is tiny and usually ignored, there's no reason for a tool that claims to be "perfectly uniform" to leave this bias in. This tool eliminates it using rejection sampling: if a generated value falls into the non-divisible trailing range, it's discarded and a new one is drawn.

javascript
// Biased โ€” earlier items have a slight advantage
var bad = crypto.getRandomValues(new Uint32Array(1))[0] % n;

// Unbiased โ€” discard and redraw values outside the uniform range
function randInt(n) {
  if (n <= 1) return 0;
  var limit = Math.floor(4294967296 / n) * n;
  var buf = new Uint32Array(1);
  do { crypto.getRandomValues(buf); } while (buf[0] >= limit);
  return buf[0] % n;
}
For shuffling, we use the Fisher-Yates shuffle. It's the standard algorithm that ensures every permutation is equally likely. The common trick of passing a random comparison function to arr.sort() is heavily biased and often produces results that are closer to the original order.

The Real Problem with Giveaways Isn't the Random Number, It's Trust

To be honest, no matter how perfect the random numbers this tool uses are, there's no way to prove it to the participants. A screenshot of the results can be easily faked, and saying "we used crypto.getRandomValues" means nothing to them.

Disputes over drawings don't come from the quality of the random number. They come from the suspicion that "the organizer just re-ran it until their friend won." This is a problem to be solved with procedure, not technology.

  • Publish the list of participants first. Before the draw, post the list of names/nicknames in an announcement, and then paste that exact list into the tool. If you only announce the results, no one knows if you added someone who wasn't on the original list.
  • Record the drawing process. A screen recording that captures everything from pasting the list to the final result serves as evidence that you didn't "re-roll". A live stream is even better.
  • Set the rules in stone beforehand. Announcing "how many, when, and with what tool" in advance reduces suspicion that you changed the conditions after the fact.
  • Pick runners-up at the same time. A common cause of disputes is having to re-draw because a winner is unresponsive. It's cleaner to pick 3 winners + 2 runners-up all at once and announce them in order.
  • If you're running a drawing large enough that participants need to be able to verify it themselves, a browser-based tool like this is not enough. You'll need a different design, such as one that uses a publicly available value as a seed.
This tool does not save draw results. It does not send them to the server. Therefore, you cannot retrieve "that one draw from before" as proof later. If you need a record, use the "Save" button on the spot to download a .txt file โ€” the draw date and time are recorded with it.

Four Modes: When to Use What

In "Pick" mode, if you set the number to pick to be equal to the total number of items, the result is the same as "Shuffle Order". However, the Shuffle mode doesn't display probability statistics, making it a better fit for uses like determining presentation order.

"Allow duplicate items" can be confusing. When OFF, one person can only be picked once (for giveaway winners). When ON, the same person can be picked multiple times (like rolling a die, where each draw is independent). If you're picking giveaway winners, you should almost always leave this OFF.

ModeWhat it doesPractical examples
PickPicks N items from a listGiveaway winners, picking a presenter, today's lunch menu
Divide into TeamsDivides items evenly into N teamsProject groups, sports day teams, study groups
Shuffle OrderRandomizes the order of the entire listPresentation order, interview sequence, exam question order
Number RangePicks from a range of numbersLotto numbers, seat numbers, prize draw numbers
In Number Range mode, setting the options to 1-45, 6 numbers, no duplicates, and sorted ascending will produce Lotto-style numbers. If the range is 100,000 or less, this tool creates an array of all the numbers and shuffles it โ€” it's more reliable and faster than repeatedly redrawing to avoid duplicates.

Handling Uneven Team Sizes

If you divide 11 people into 3 teams, you'll get teams of 4, 4, and 3. The question is, "Who gets to be on the team of 3?" If you simply slice the list from the top, the last team always loses out.

This tool first shuffles the entire list, then assigns members to teams one by one in a round-robin fashion. This ensures the size difference between any two teams is at most one, and which team gets an extra member is also determined randomly by the shuffle.

  • If you leave the team names blank, they will be automatically named Team 1, Team 2, Team 3, etc. If you provide comma-separated names like "Red, Blue, Green", those names will be used.
  • If you provide fewer team names than the number of teams, the remaining teams will be given automatic numeric names.
  • This tool cannot perform skill-based balancing; it is purely random. If skill balance is needed, a practical approach is to create separate groups for high, mid, and low-skilled players, run the tool on each group, and distribute the members into the final teams.
  • The message below the results tells you how the teams were divided. If it's an even split, it will say "with exactly N members each." If not, it will specify how many teams have how many members.
The item list is saved in your browser (on this device only, not on the server) so you can easily use it again. The draw results are not saved. This is convenient when you need to create new teams from the same list multiple times.

Frequently asked questions

Is this tool truly fair? Can it be manipulated?

Yes. It uses the browser's cryptographic random number generator (`crypto.getRandomValues`) and removes modulo bias via rejection sampling, ensuring every item has an identical chance. Shuffling uses the unbiased Fisher-Yates algorithm. Input order has no effect on the outcome.

How are teams divided if the number of people isn't even?

The list is shuffled, then items are assigned to teams one by one in sequence. This ensures team sizes differ by at most one person. For example, dividing 10 people into 3 teams results in groups of 4, 3, and 3. Which team gets the extra member is also random.

Can I use this for lottery numbers?

Yes. Select the "๐Ÿ”ข Number Range" mode, set "Min" to 1, "Max" to 45, and "Number to Pick" to 6. Uncheck "Allow duplicate numbers" and check "Sort in ascending order". This generates random numbers but does not guarantee a win.

Is the list of names I enter sent to a server?

No. All drawing and shuffling operations run entirely in your browser. Your item list and the results are never sent to or stored on any server. For your convenience, your input list is saved in your browser's local storage for your next visit.