Privacy: this generator runs client-side in your browser—your list isn’t sent to a server.
Whether you’re organizing a classroom activity, splitting players for a pickup game, or assigning coworkers to breakout sessions, forming teams in a balanced and unbiased way can be difficult to do manually. People tend to pick friends or familiar faces, and even with good intentions you can accidentally stack experience levels or isolate someone.
A random team generator reduces subjectivity by distributing participants unpredictably. It also makes “re-rolling” easy: if you want a fresh mix for the next round, you can generate again in seconds.
The core of the tool is the Fisher–Yates shuffle, a standard algorithm for randomizing a list. It iterates from the last index down to the first, swapping the current element with another element at a randomly selected earlier index (including itself). When the random number source is uniform, Fisher–Yates produces each possible permutation with equal probability, which is a strong baseline for “fair” mixing.
After shuffling, the tool assigns names to teams in a simple, deterministic pass (commonly round-robin). This creates team sizes that are as even as possible.
For n unique names, the number of possible orders (permutations) is:
This grows extremely quickly. Even at n = 10, there are 10! = 3,628,800 possible orders—so repeatedly shuffling explores a very large space of outcomes.
If you’re thinking in terms of possible groupings rather than orders, you can also use combinations. For example, the number of ways to choose a team of size k from n people is the binomial coefficient:
C(n, k) = n! / (k!(n − k)!)
This tool does not enumerate all possible teamings (that would be slow for large lists). Instead, it samples a random ordering and then slices/allocates.
When the number of participants isn’t divisible by the number of teams, perfectly equal sizes are impossible. This generator aims for the most balanced distribution: team sizes will differ by at most 1. In practice that means some teams will have one extra person.
Let n be the number of names and t be the number of teams.
| Names (n) | Teams (t) | Balanced size distribution |
|---|---|---|
| 9 | 4 | 3, 2, 2, 2 |
| 10 | 3 | 4, 3, 3 |
| 7 | 2 | 4, 3 |
| 16 | 5 | 4, 3, 3, 3, 3 |
Which specific people end up in each team changes on every run; the distribution pattern above describes only the sizes.
Input names (10 participants):
Alex Brooke Chris Dana Elliot Fatima Gabe Harper Isaac Jules
Number of teams: 3
Because 10 ÷ 3 = 3 remainder 1, you’ll get one team of 4 and two teams of 3 (4,3,3). After shuffling, one possible result might look like:
If you click generate again, the membership changes, but the sizes stay balanced (4,3,3).
Math.random() is not cryptographically secure. It’s suitable for classrooms, sports, and workshops, but not for gambling, security decisions, or high-stakes selection.