Pair rules: keep apart or keep together (Random mode)
One rule per line, names joined with +, for example Alex + Devon. Names must match the list (upper and lower case are ignored). Rules apply in Random mode only.
Your list and settings are saved in this browser on this device only. Nothing is uploaded.
Your teams
About this tool
This random team generator splits a list of names into teams or groups in one click. Choose how many teams you want or how many people go in each team, then pick a mode. Random shuffles everyone with your browser's cryptographic random source. Balanced uses skill ratings you add after each name and runs a snake draft so the teams come out close in total strength, with each team's skill total shown. Optional pair rules keep two people apart or together. The list stays on your device.
How to use the team generator
- Paste the names, one per line. To use Balanced mode, add a comma and a skill number after a name, such as
Alex, 3. Any number from 0 to 1000 works, with up to two decimal places, so a 1 to 5 rating or a 1 to 10 score are both fine. A line with no number, or with a comma that is not followed by a number, such asSmith, John, is kept whole as a name. - Choose Split by. Number of teams makes exactly that many teams. People per team makes as many teams as needed so no team is bigger than the number you enter.
- Pick the mode: Random or Balanced by skill.
- Click Generate teams. Each team appears as a card with its members, and the skill total when skill numbers are present. Re-roll teams draws again with the same settings.
- Share the result. Projector view fills the screen with the teams for a classroom board or a gym screen. Copy teams gives plain text for a chat message, and Download CSV gives a spreadsheet file with one row per person.
How the random mode stays fair
Random mode shuffles the whole list with a Fisher-Yates shuffle driven by crypto.getRandomValues(), which returns cryptographically strong random values, rather than Math.random(). Each step uses rejection sampling, so there is no remainder bias. The shuffled list is then dealt round the teams like cards: first person to Team 1, second to Team 2, and so on. Every ordering of the list is equally likely, so every way of splitting people into teams of those sizes is equally likely too.
Team sizes never differ by more than one. If the list does not divide evenly, the first teams get the extra person. With 10 names and People per team set to 4, the tool makes 3 teams of 4, 3 and 3 rather than 4, 4 and 2.
Pair rules work by redrawing. The tool shuffles and deals, checks every rule, and draws again until all the rules are met, up to 20,000 tries. Because rejected draws are simply thrown away, every split that obeys the rules stays equally likely. If the rules cannot be met, for example a keep-together group larger than a team, you see a message saying which rule is the problem.
How balanced mode works
Balanced mode sorts players from highest to lowest skill and then runs a snake draft. In the first round Team 1 takes the strongest player, then Team 2, then Team 3. In the second round the order reverses, so the last team picks first. The direction flips every round. This stops Team 1 from getting the best player in every round.
Players with the same skill number are shuffled with the crypto random source before the draft, so a re-roll swaps people of equal skill between teams while the totals stay the same. If every skill number is different, balanced mode gives the same teams every time, because the draft order is fixed by the ratings. A name without a skill number counts as 0 in Balanced mode and the status line tells you how many such names there are. Pair rules are not used in Balanced mode.
A snake draft keeps totals close but does not always make them identical. The summary shows the spread between the highest and lowest team total, so you can judge whether to adjust a rating or move one person by hand.
Worked example
The sample list holds 12 players rated 1 to 5. Their skills add up to 37. With the default settings, Random mode and 3 teams, the tool makes 3 teams of 4. There are 5,775 different ways to split 12 people into three unlabeled groups of four, and any two named players end up on the same team 3 times in 11, about 27.3% of the time. The skill totals change from roll to roll.
Switch Mode to Balanced by skill and click Generate teams. Sorted by skill, the ratings are 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 1, 1. The snake draft gives:
| Team | Draft picks (by sorted position) | Skills | Total |
|---|---|---|---|
| Team 1 | 1st, 6th, 7th, 12th | 5 + 3 + 3 + 1 | 12 |
| Team 2 | 2nd, 5th, 8th, 11th | 5 + 4 + 3 + 1 | 13 |
| Team 3 | 3rd, 4th, 9th, 10th | 4 + 4 + 2 + 2 | 12 |
The spread is 1. Team 3 always gets both players rated 2, Emerson and Jordan, because no one else shares their rating. Alex and Devon, both rated 5, swap between Team 1 and Team 2 on re-rolls, and so do the three players rated 4 and the three rated 3 within their draft slots.
Classroom and sports uses
- Group work. Paste the class list, set People per team to 3 or 4 and project the groups. Keep-apart rules help separate two students who distract each other.
- Pickup games and PE. Rate players 1 to 5 and use Balanced mode so the first game is not a blowout. Re-roll for a new mix that keeps the totals.
- Office events and trivia nights. Random mode mixes departments, and keep-together rules let a carpool or a pair of new hires stay together.
- Random partners. Set People per team to 2 for random pairs. With an odd count, one person would be left alone, so use Number of teams instead: 11 people in 5 teams gives one group of three and four pairs.
Common mistakes
- Writing the skill before the name, as in
3, Alex. The number has to come last. - Expecting re-rolls to change balanced teams when every rating is different. Use Random mode, or give similar players the same rating.
- Leaving out ratings for a few players in Balanced mode, which treats them as the weakest players.
- Typing a different spelling in a pair rule from the one in the list.
Need one person instead of a group? Spin the Random Name Picker. To settle who goes first, use the Yes or No Wheel or a Coin Flip, and for numbered seats try the Random Number Generator. A messy list is easier to clean first with the Duplicate Remover and Text Sorter.
Random group generator: by number of groups or by group size
You can split a list two ways. Choose Number of teams when you know how many groups you want, such as 4 groups from a class. Choose People per team when you know the group size, such as groups of 4. If the names do not divide evenly, the groups are filled as evenly as possible, so sizes never differ by more than one. For example, 25 names in groups of up to 4 become 7 groups: four groups of 4 and three groups of 3.
| Names | Setting | Result |
|---|---|---|
| 24 | Number of teams: 4 | 4 groups of 6 |
| 24 | People per team: 4 | 6 groups of 4 |
| 25 | People per team: 4 | 7 groups: four of 4, three of 3 |
| 30 | Number of teams: 7 | 7 groups: two of 5, five of 4 |
For a game, use the Pictionary Word Generator or hand each group a random topic from the Random Object Generator. To pick one winner instead, use the Random Name Picker.
Frequently asked questions
Paste the class list with one name per line, set Split by to People per team and enter 4, keep Random mode, then click Generate teams. If the class does not divide evenly, some groups get one person fewer, so no group is ever more than one person smaller than the others. Use Projector view to show the groups on the board.
Yes. Add a rating after each player, such as Jordan, 4, choose Balanced by skill and set the number of teams. The snake draft spreads strong and weaker players across the teams and shows each team total and the spread between the strongest and weakest team, so you can tweak ratings if a game still looks lopsided.
Balanced mode is driven by the skill numbers. Only players with exactly the same rating are shuffled, so if every rating is different the draft has nothing to randomize. Give players of similar ability the same number, for example a 1 to 5 scale, or switch to Random mode for a completely new mix on every roll.
Up to 5,000 names and up to 500 teams. Large lists still split instantly because the shuffle and the snake draft are simple passes over the list. Projector view and the CSV download work at any size, although very large team cards are easier to read in the CSV file in a spreadsheet.
The list, the settings and any pair rules are saved in your browser local storage on this device so they are still there next time. Nothing is uploaded to a server. Private browsing windows and clearing site data remove the saved list, and Reset to sample list clears it straight away.
The tool never breaks a rule. Impossible rules, such as keeping four people apart with only three teams, are reported straight away. Rules that are possible but very unlikely to be met by chance are tried for up to 20,000 random draws before an error appears. Remove a rule or change the number of teams and try again.
Paste your names, one per line, choose Number of teams or People per team, and press the generate button. The names are shuffled with your browser secure random source and split into groups.
The groups are made as even as possible, so no group is more than one person larger than another. For example, 25 names in groups of 4 make four groups of 4 and three groups of 3.