Random team generator
Paste names, one per line, pick how many teams you want, and draw. Team sizes never differ by more than one, and anyone you mark is spread across the teams.
Example draw: 17 people, 4 teams
Team 1 (5)
- Grace ★
- Hugo
- Finn
- Kira
- Leo
Team 2 (4)
- Dev ★
- Priya
- Olive
- Chloe
Team 3 (4)
- Nico ★
- Quinn
- Maya
- Jonah
Team 4 (4)
- Amara ★
- Isla
- Ben
- Elena
The link contains what you entered, encoded after the #. Nothing is uploaded; whoever opens the link can read it.
Team sizes at a glance
How a group divides into 2 to 6 teams when sizes may differ by at most one. “1 × 5, 3 × 4” means one team of five and three of four.
| People | 2 teams | 3 teams | 4 teams | 5 teams | 6 teams |
|---|---|---|---|---|---|
| 10 | 2 × 5 | 1 × 4, 2 × 3 | 2 × 3, 2 × 2 | 5 × 2 | 4 × 2, 2 × 1 |
| 12 | 2 × 6 | 3 × 4 | 4 × 3 | 2 × 3, 3 × 2 | 6 × 2 |
| 15 | 1 × 8, 1 × 7 | 3 × 5 | 3 × 4, 1 × 3 | 5 × 3 | 3 × 3, 3 × 2 |
| 17 | 1 × 9, 1 × 8 | 2 × 6, 1 × 5 | 1 × 5, 3 × 4 | 2 × 4, 3 × 3 | 5 × 3, 1 × 2 |
| 20 | 2 × 10 | 2 × 7, 1 × 6 | 4 × 5 | 5 × 4 | 2 × 4, 4 × 3 |
| 24 | 2 × 12 | 3 × 8 | 4 × 6 | 4 × 5, 1 × 4 | 6 × 4 |
| 30 | 2 × 15 | 3 × 10 | 2 × 8, 2 × 7 | 5 × 6 | 6 × 5 |
How the teams are drawn
The generator does two things, in this order. First it shuffles the list with the Fisher–Yates shuffle: walking from the last name to the first, it swaps each name with one chosen at random from the names not yet fixed. Given a fair source of random numbers, that produces every possible ordering with exactly equal probability. Second, it deals the shuffled names out to the teams in turn, like dealing cards, which is what keeps the sizes within one of each other.
The random numbers come from crypto.getRandomValues, the operating system’s
cryptographically secure generator exposed by the browser, not from Math.random. Turning a
32-bit random value into “a number from 0 to n − 1” with a plain remainder would favour small
numbers very slightly whenever n does not divide 232, so values from the top sliver
of the range are thrown away and redrawn (rejection sampling). The bias this removes is tiny, but
there is no reason to keep it.
People in the “spread these out” box are shuffled and dealt first, so they fall one per team before anyone else is placed. With four teams and four marked people, each team gets exactly one; with six marked people, two teams get two. The order of the teams is itself shuffled before dealing, so the extra marked person or the extra member does not always land on Team 1.
A worked example
The draw above splits 17 people into 4 teams, with Amara, Dev, Grace and Nico marked as captains. 17 divided by 4 is 4 remainder 1, so one team has 5 people and the other three have 4. The four captains are dealt first, one to each team, then the remaining 13 names follow in shuffled order.
Switching to “people per team” asks a different question. With 17 people and teams of 4, the tool
makes round(17 ÷ 4) = 4 teams, and you get the same 5-4-4-4 split. With teams of 3 it
makes round(17 ÷ 3) = 6 teams, which come out as five teams of 3 and one of 2. That is
as close to “teams of 3” as 17 whole people allow. If a lone
pair is awkward for your game, choose 5 teams instead and accept teams of 4, 4, 3, 3, 3.
Balancing by ability
A random draw is fair in the sense that nobody chose the teams. It is not the same as balanced: with a small group, chance alone can put the three strongest players together. Two ways to guard against that:
- Spread the strongest players. Put them in the spread box. Each team gets as even a share of them as possible, and everything else stays random.
- Snake draft. Rank everyone from strongest to weakest, then assign in the order 1-2-3-4-4-3-2-1-1-2-3-4 and so on. Each team’s advantage from picking first in one round is paid back by picking last in the next. It is the standard method in playground picks and fantasy sports drafts, and it needs a ranking that only you can supply.
Where it stops being useful
The tool does not know who anyone is. It cannot keep friends together, keep two particular people apart (beyond the spread box), or balance by age, gender or department unless you mark those people. If you mark more than one group, they are all treated as one group. For classroom groups where specific pairs must not work together, draw, check, and redraw; each draw is independent.
Common questions
Is this random enough to be fair?
Yes. The order of names is shuffled with the Fisher–Yates algorithm, and every random number comes from crypto.getRandomValues, the browser’s cryptographically secure generator, with rejection sampling so that no position is more likely than another. Every arrangement of people into teams is equally likely, apart from the constraint that marked people are spread out.
Why is one team bigger than the others?
Because the number of people does not divide evenly. 17 people in 4 teams must be one team of 5 and three of 4. The generator never lets team sizes differ by more than one, and it picks at random which teams get the extra member, so it is not always Team 1.
Can it balance teams by skill?
Partly. Put your strongest players, or your captains, in the “spread these people out” box and each team gets as close to the same number of them as possible. It does not know how good anyone is beyond that. For finer balancing, rank everyone and use a snake draft, described above, which this page cannot do for you without asking you to score people.
How do I share the teams with everyone?
Press “Copy share link” after drawing. The link contains the names and the teams, encoded after the # in the address, so anyone who opens it sees exactly the same teams. Nothing is uploaded to a server; the link itself is the only copy.
Can I stop two particular people ending up together?
Not directly on this page. If two people must be apart, add both to the “spread out” list: with at least two teams they will always land on different teams. That list is designed for captains, but it works for any group that should not cluster.
Other tools
- Group availability poll When can all eight of us meet next week?
- Random name picker Who goes first? Pick a name out of the hat.
- Weighted decision matrix Which option wins once we agree what matters most?
- Ranked-choice vote counter We ranked the options. Who actually won?
- Meeting cost calculator What does our weekly status meeting really cost?
- Time-zone meeting planner When can New York, London and Bangalore all meet?
- Bill splitter I had the steak, she only had a starter. Who owes what?
- Secret Santa generator Draw names for the office gift exchange, but not partners.