Skip to content
CornerTools

Random Team Generator

Split a list of names into random, fair teams — by team count or size, with balancing and keep-apart rules.

12 names, one per line.

Split by

2 teams of 6.

Paste a list of names and get random teams: for a match, a class project, a quiz night or a work rota. Choose how many teams or how many people in each, and the tool deals the names out at random. Tag names with a skill to keep team totals close, or with a label to spread a class or a gender evenly, and add rules for people who must or must not be on the same team.

How to use it

Names takes one name per line, up to 1,000. Blank lines are skipped. A name listed twice is two people, shown as Sam (1) and Sam (2), whatever the capitals. The page opens with 12 sample names to replace with your own; Add samples adds 6 more and Clear empties the list. The teams are drawn as you type, once you pause.

Tags go after a vertical bar, separated by commas. A number is a skill, from any rating you like, with up to two decimal places; a name without one counts as 0. Any other word is a label, such as a class, a year or a gender; labels match whatever their capitals. Each name takes one skill and one label.

Names with tags
Asha | girl, 4
Ben | boy, 2.5
Chen | 3
Dara | girl
  • Split by — a number of teams, or a number of people per team. Teams by count differ in size by at most one. By people per team, the people left over are spread over teams, so 10 people in teams of 4 make 4, 3 and 3, or go in a smaller last team: 4, 4 and 2.
  • Team names — Team 1, Team 2; Team A, Team B; the colours Red, Blue, Green, Yellow and on to 12 colours, for bibs; or your own list, one per line. Teams past the end of a list are numbered.
  • Pick a captain for each team marks one person per team, drawn at random. Turning it on or off keeps the same teams.
  • Keep some people apart or together shows two lists. Keep apart and Keep together take one group per line, names separated by commas. Everyone in a keep-apart line goes to a different team, so a line can name as many people as there are teams. A rule naming someone not on the list, a keep-together group bigger than a team, or the same two people both kept apart and together, is pointed out before any draw. Turning the switch off sets the rules aside without deleting them.

Shuffle draws the same list again. Copy teams copies the teams as text, one team per block, and Copy link gives a link that opens the same teams for someone else. The names and teams sit after the # in that link, which browsers do not send to a server. Your list, options and last teams are remembered in this browser, on this device.

How it works

Without tags or rules, the names are shuffled with your browser’s cryptographic random generator and dealt into the teams, so every split is equally likely.

With tags or rules, the tool looks for the fairest split, in this order: every rule kept, then each label spread as evenly as it can be (with 7 girls in 3 teams, each team gets 2 or 3), then the smallest gap between the highest and lowest skill totals. Up to 12 people, it checks every possible split and draws one at random from those that tie for best, so the gap shown is the smallest there is. Above that there are too many splits to check, so it places people one at a time, strongest first, each where it does the least harm, then swaps people between teams while a swap makes the split fairer. The result then says the gap it reached; it is usually the smallest or close to it.

If no split keeps every rule, for example keep-together pairs that cannot add up to the team sizes, the tool says so instead of breaking a rule.

Examples

Two teams balanced by skill

Names
Asha | 9
Ben | 8
Chen | 7
Dara | 6
Emeka | 5
Fatima | 5
Grace | 4
Hiro | 3
Imani | 2
Jorge | 1
Split by
Number of teams: 2

One draw gives Team 1: Ben, Chen, Emeka, Grace, Jorge, skill 25; Team 2: Asha, Dara, Fatima, Hiro, Imani, skill 25. The gap is 0, the smallest possible; each draw picks at random among the splits with that gap.

Spread two classes, and keep two pupils apart

Names
Asha | 7A
Ben | 7A
Chen | 7A
Dara | 7A
Emeka | 7B
Fatima | 7B
Grace | 7B
Hiro | 7B
Imani | 7B
Split by
Number of teams: 3
Keep apart
Ben, Chen

Four pupils from 7A and five from 7B in three teams of three: each team gets one or two from 7A, and one or two from 7B. One draw gives Team 1: Chen, Fatima, Grace; Team 2: Ben, Dara, Imani; Team 3: Asha, Emeka, Hiro.

Frequently asked questions

Split by people per team and enter 2. With an odd number of names one person is left on their own: 9 names make teams of 2, 2, 2, 2 and 1. For a group of three instead, split by number of teams and enter half the names, rounded down: 9 names in 4 teams make 3, 2, 2 and 2.

See also