ToolNimba

๐Ÿ‘ฅ Random Team Generator, Split Names into Fair Teams

Shihab Mia By Shihab Mia ยท Updated 2026-07-06

This random team generator takes a list of names and splits them into the number of teams you choose, shuffling everyone fairly first so no one can predict the result. It uses a Fisher-Yates shuffle seeded by your browser cryptographic randomness, then deals names round-robin so every team ends up within one member of the same size. You can switch between "number of teams" and "players per team" mode, regenerate for a fresh draw, and copy all teams as text with one click.

What is the Random Team Generator?

A fair team generator has to do two separate jobs well: shuffle the names without bias, and share them out so the teams come out even. Most quick scripts get the first part wrong by using a naive shuffle that subtly favours certain orderings. This tool uses the Fisher-Yates algorithm, the standard proven method for producing every possible ordering with equal probability, and it draws its random numbers from crypto.getRandomValues rather than the weaker Math.random. That means the draw is genuinely unpredictable and no arrangement is more likely than any other.

The second job is balance. After the names are shuffled, they are dealt out one at a time in a round-robin: the first name goes to Team 1, the second to Team 2, and so on, wrapping back to Team 1 after the last team. Dealing this way guarantees that team sizes can differ by at most one. If you split 10 people into 3 teams you get sizes of 4, 3, and 3 rather than 6, 2, and 2. Because the shuffle happens before the deal, which specific people land on the larger team is random every time.

The tool offers two ways to describe the split. In "number of teams" mode you type how many teams you want, from 2 up to the number of names you entered. In "players per team" mode you type the target team size and the tool works out how many teams that needs, rounding up so nobody is left out. For example, 10 names at 4 players per team produces 3 teams (4, 4, 2), because two full teams of 4 only account for 8 people and the remaining 2 still need a team. Both modes finish with the same even round-robin deal.

Everything runs locally in your browser with plain JavaScript, so your list of names is never uploaded and there is no limit imposed by a server. Regenerate reshuffles the same list for a completely new set of teams, which is useful when you want a few draws to compare, or when the first result happened to put two people together who should be split up. Copy All puts the teams on your clipboard as clean text you can paste into chat, a document, or a scoreboard.

When to use it

  • Splitting a class or workshop into small groups for a project or discussion.
  • Making fair teams for a sports scrimmage, trivia night, or gym session.
  • Dividing coworkers into breakout groups for a meeting, hackathon, or offsite.
  • Randomly pairing people for secret santa style draws or buddy systems.
  • Setting up balanced sides for board games, video games, or tabletop campaigns.
  • Running an unbiased draw where everyone can see the shuffle was not rigged.

How to use the Random Team Generator

  1. Type or paste your names into the box, one name per line.
  2. Choose "Number of teams" and enter how many teams you want, or switch to "Players per team".
  3. Read the team cards below; each shows a heading and its members with the size in brackets.
  4. Click Regenerate to reshuffle the same names into a fresh set of teams.
  5. Click Copy All to copy every team as text you can paste anywhere.

Formula & method

Collect the non-empty names into a list. Shuffle with Fisher-Yates: for i from the last index down to 1, pick a random j between 0 and i using crypto.getRandomValues, then swap item i with item j. Decide the team count: in "number of teams" mode it is the number you typed; in "players per team" mode it is ceil(total names / players per team). Deal round-robin: place shuffled name at position k into team number (k mod team count). This keeps every team size within one of the others.
Shuffle fairly, then deal round-robin into balanced teams1. Names inAlex, Blake, Casey ...2. Fisher-Yates shuffle (crypto)Harper, Dana, Gray ...3. Deal 1, 2, 3, 1, 2, 3 ...Team 1 (4)HarperDanaEllisTeam 2 (3)GrayIndiraTeam 3 (3)CaseyJordanSizes stay within one ofeach other: 4, 3, 3.Regenerate reshuffles the same names into a new draw.

Worked examples

Split 10 names into 2 teams (the default on load).

  1. Enter 10 names, one per line, and set number of teams to 2.
  2. The 10 names are shuffled with Fisher-Yates into a random order.
  3. Dealing round-robin, names at positions 0, 2, 4, 6, 8 go to Team 1 and positions 1, 3, 5, 7, 9 go to Team 2.
  4. Each team receives exactly 5 members, so the sizes are perfectly even.

Result: Two teams of 5, with a different mix of people every time you regenerate.

Split 10 names into 3 teams.

  1. Set number of teams to 3.
  2. After shuffling, names are dealt to teams 1, 2, 3, 1, 2, 3, 1, 2, 3, 1.
  3. Team 1 receives the 1st, 4th, 7th, and 10th names, which is 4 members.
  4. Teams 2 and 3 receive 3 members each.

Result: Team sizes of 4, 3, 3, differing by at most one as intended.

Use "players per team" mode with 10 names and 4 per team.

  1. Switch the mode to "Players per team" and enter 4.
  2. The tool computes ceil(10 / 4) = 3 teams needed.
  3. The 10 shuffled names are dealt round-robin into 3 teams.
  4. This yields sizes of 4, 3, 3 rather than 4, 4, 2, because round-robin keeps teams balanced.

Result: 3 teams sized 4, 3, 3, since 4 players per team is a target that rounds up to 3 teams.

How names divide across teams (round-robin, sizes differ by at most one)

NamesTeamsResulting team sizes
824, 4
1034, 3, 3
1143, 3, 3, 2
1544, 4, 4, 3
2054, 4, 4, 4, 4
733, 2, 2

Number of teams vs players per team, for the same list of names

ModeYou enterTool usesExample with 12 names
Number of teamsHow many teams you wantThat number directly3 teams of 4
Players per teamTarget size per teamceil(names / size) teams4 per team gives 3 teams of 4
Players per teamTarget size per teamRounds up so nobody is dropped5 per team gives 3 teams (4, 4, 4)

Common mistakes to avoid

  • Expecting exactly even teams when the numbers do not divide. If your name count is not a clean multiple of the team count, teams cannot all be identical. The tool keeps them within one of each other, so 10 names in 3 teams gives 4, 3, 3, which is the fairest possible split.
  • Confusing "players per team" with "number of teams". In "players per team" mode the number you type is a target team size, not a team count. Entering 4 with 10 names makes 3 teams (not 4), because 3 teams are needed to seat everyone at roughly 4 each.
  • Leaving blank lines in the name list. Empty lines are ignored, which is intentional, but a stray line with just a space is treated as blank too. If a team looks short, check that every intended name actually has text on its own line.
  • Assuming Regenerate changes the teams sizes. Regenerate reshuffles who is on each team but keeps the same number and sizes of teams, because those are set by your inputs. To change sizes, change the team count or the players-per-team value.

Glossary

Fisher-Yates shuffle
A proven algorithm that reorders a list so that every possible ordering is equally likely, giving an unbiased random shuffle.
Round-robin dealing
Handing out items one at a time to each team in turn and wrapping back to the first, which keeps team sizes within one of each other.
crypto.getRandomValues
A browser function that produces cryptographically strong random numbers, stronger and less predictable than Math.random.
Number of teams mode
A setting where you specify how many teams you want and the tool splits the names into exactly that many groups.
Players per team mode
A setting where you specify the target size of each team and the tool calculates how many teams are needed, rounding up.
Balanced teams
Teams whose sizes differ by at most one member, the fairest split possible when a list does not divide evenly.

Frequently asked questions

What is a random team generator?

A random team generator is a tool that takes a list of names and splits them into a chosen number of teams after shuffling everyone fairly, so the groups are unpredictable and roughly equal in size. This one shuffles with a Fisher-Yates algorithm and deals names round-robin so teams differ by at most one member.

How does the tool keep the teams balanced?

After shuffling, it deals names one at a time to each team in turn and loops back to the first team, a method called round-robin. This guarantees that no team is ever more than one member larger than another, so a split like 10 people into 3 teams comes out as 4, 3, 3.

Is the shuffle actually random and fair?

Yes. It uses the Fisher-Yates shuffle, which produces every possible ordering with equal probability, and it draws randomness from your browser crypto.getRandomValues rather than the weaker Math.random. No name has a better or worse chance of ending up on any particular team.

What is the difference between number of teams and players per team?

In "number of teams" mode you say how many teams you want and the tool makes exactly that many. In "players per team" mode you give a target team size and the tool works out how many teams that needs, rounding up so everyone gets placed. For 10 names, 4 players per team produces 3 teams.

Can I regenerate the teams if I do not like the first draw?

Yes. Click Regenerate to reshuffle the same list into a completely new set of teams. The number and sizes of teams stay the same because those come from your inputs, but who lands where changes every time.

How many names can I add?

There is no server-imposed limit because the tool runs entirely in your browser. You can paste as many names as your device handles comfortably, one per line, and split them into anywhere from 2 teams up to as many teams as you have names.

Are my names uploaded anywhere?

No. All the shuffling and dealing happens locally in your browser using JavaScript, so your list of names never leaves your device and nothing is sent to a server.

Why did I get uneven team sizes?

Teams can only be perfectly even when the number of names divides exactly by the number of teams. When it does not, the tool makes them as even as possible, with sizes differing by at most one, which is the fairest arrangement.