Team Generator
Split a list of names into balanced random teams, with optional leaders and people to keep together or apart. Copy as text, Markdown or CSV.
0 people
Leaders must be on the list. Each team gets at most one, as its captain.
One per line: “A + B” keeps people together, “A != B” keeps them apart.
Shortcut: Ctrl/⌘ + Enter to make teams
How to use
- Paste your names, one per line. A repeated name is counted once.
- Choose “Number of teams” or “Team size” and enter a number. The team sizes are shown below and always differ by at most one.
- Optionally list leaders, at most one per team, or let teams without a leader get a random captain.
- Under “Rules”, write “A + B” to keep two people together or “A != B” to keep them apart.
- Click “Make teams” or press Ctrl/⌘ + Enter, then copy the teams as plain text, Markdown or CSV, or download them.
FAQ
Are the teams random and fair?
Yes. The tool uses crypto.getRandomValues() from your browser’s Web Crypto API. Without leaders or rules, the whole list is shuffled with the Fisher–Yates algorithm and dealt into the teams, so every possible split is equally likely.
Are teams still random with rules?
They are random, but not every split is guaranteed to be exactly equally likely. In random order, the tool puts each group that must stay together into a team that has room and holds nobody they must be kept apart from, starting over when it gets stuck, up to 500 times. If the rules are too tight or contradict each other, it tells you instead of ignoring a rule.
What if the names do not divide evenly?
Team sizes differ by at most one, with larger teams first. 10 people in 3 teams gives 4, 3 and 3. With “Team size” 4, 10 people become 3 teams of 4, 3 and 3 rather than 4, 4 and 2.
Is my list uploaded?
No. Everything runs in your browser. The list is never sent to a server or saved, and it is gone when you reload the page.
Why not more complex rules?
Combinations of together and apart rules can be very hard to solve in general. The tool supports simple rules (together, pairwise apart, leaders apart), which cover classroom and event groups; for anything more complex, make teams first and adjust by hand.
Related tools
Random Picker
Paste a list of names and fairly draw one or more winners, with optional weights, removal of past winners and a history of rounds.Random Number Generator
Generate random whole numbers or decimals in any range, with options for count, no repeats, sorting and excluded values.Sort Lines
Sort lines alphabetically, naturally (file2 before file10), by number or length, reverse them or shuffle them randomly.Remove Duplicate Lines
Remove duplicate lines from text, optionally ignoring case and whitespace, or list only the lines that repeat.