Random Team Generator for Sports, Games and Quizzes

Random Team Generator for Sports, Games and Quizzes

A random team generator should shuffle names into piles, not invent a “balanced skill” story. FlashKit’s random team generator takes one name per line and a number of groups, Fisher–Yates shuffles with Math.random(), then deals round-robin. That is the whole algorithm. It will not keep two cousins apart, will not mix strikers evenly, and will not remember last week’s sides.

Team-size arithmetic for odd counts

You enter the number of teams, not the roster size per team. Convert first. Verified by running the same deal as the component (index % groupsCount after a shuffle; order does not change sizes):

  • 8 players, 4 teams → 2, 2, 2, 2. Check: 4 × 2 = 8.
  • 11 players, 3 teams → 4, 4, 3. Check: 4 + 4 + 3 = 11.
  • 7 players, 2 teams → 4, 3. Check: 4 + 3 = 7.
  • 15 players, 4 teams → 4, 4, 4, 3. Check: 4 × 3 + 3 = 15.
  • 6 players, 4 teams → 2, 2, 1, 1. More teams than a tidy split still differs by at most one.

The extra names land in the first groups because round-robin starts at index 0. Asking for more groups than names is rejected (“Cannot have more groups than items.”). Empty lists and non-positive group counts are rejected too.

Split the roster into N teams

One name per line, number of groups, Fisher–Yates then round-robin.

Open the group generator

Sports, quizzes, offices — and re-rolls

Football / five-a-side. Pick N from the pitch (2 sides, or 3 if you are rotating). Paste the squad. Generate. Swap keep-apart pairs after the roll. Skill bands (one “organiser” per side) are a manual zip, not a hidden toggle.

Quiz night. N = number of tables. Odd headcount means one table is larger by one. Keep score with the tick counter (one card per table). Classroom grouping with the same widget: split a class into random groups.

Office games. N from the number of whiteboards or breakout rooms. Screenshot; a refresh restores the eight-name sample (Alice…Heidi) and forgets the cards.

Re-roll with Generate Groups as often as you like before you show the room. Each click is an independent shuffle. After names are public, a re-roll looks like shopping for a nicer outcome. The code does not bias later rolls — people do. For a single volunteer instead of teams, the random picker draws one name.

Draw one name instead

Random picker: one winner from a list. Same Math.random() family, not teams.

Open the random picker

What the algorithm is, and what it is not

Fisher–Yates walks the array from the end, swapping each index with a random earlier index, using Math.random(). After the shuffle, name i is pushed onto group i % N. That is round-robin on a permuted list, which is why sizes differ by at most one and why the extra remainder names sit on the first groups. It is not seeding from a team-strength column. It is not “keep these two apart.” It is not a snake draft (1-2-3-3-2-1). If you need snake draft, zip by hand after the roll.

Duplicates are kept. Two lines that both say “Sam” are two players. Blank lines are dropped. The sample list (Alice through Heidi) returns on refresh; generated cards are not written to localStorage. Screenshot or copy before you close the tab. There is no undo except Generate Groups again, which is a new shuffle, not a revert.

Fairness for a pub quiz: good enough. Fairness for a prize draw that must be audited: not this page. Math.random() is not crypto.getRandomValues. The picker tool is the same family for a single name. Neither page publishes a seed, a shuffle log, or a “provably fair” hash. If a league requires a documented draw, use a procedure they specify, not a browser tab.

Sports sizes, then stop editing the list in public

Five-a-side: 10 names, 2 groups → 5 and 5. Add a sub and you have 11 names, 2 groups → 6 and 5. That is the remainder landing on group 0. Three rotating sides from 15 names → 5, 5, 5 if you set N = 3. Quiz tables of roughly 4 from 18 names: 18 / 4 = 4.5, so you want either 4 tables (sizes 5, 5, 4, 4) or 5 tables (4, 4, 4, 3, 3). Pick N, do not type “4 per team” into a field that does not exist.

After the cards are on the projector, do not re-roll because table 3 groaned. Swaps for a keep-apart pair (siblings, a player-coach) are a social edit: move one name, leave the rest. Re-rolling the whole room looks like shopping. The code will not stop you — each click is independent — but the room will remember. Score the tables with the tick counter (one card per table). The group generator does not tally points.

Sizes from N, not from “players per team”

The form asks for Number of Groups. Convert from “we want teams of about K” yourself: teams N = round(players / K), then look at the sizes the deal will actually produce (they differ by at most one). 18 players, about 4 per table: 18/4 = 4.5, so N = 4 → sizes 5, 5, 4, 4 (check: 5+5+4+4 = 18) or N = 5 → 4, 4, 4, 3, 3 (check: 4×3+3+3 = 18). 12 players, 2 sides → 6 and 6. 12 players, 3 sides → 4, 4, 4. 13 players, 3 sides → 5, 4, 4 because 13 = 4×3 + 1 and the remainder lands on group 0.

More groups than names is rejected. Zero or negative groups is rejected. An empty list after trimming blank lines is rejected. Duplicate names are two people. If two players share a name, disambiguate in the paste (“Sam (A)”, “Sam (B)”) — the shuffle will not merge them and will not keep them apart.

Classroom grouping with the same widget is the sibling split-class guide. This page is the sports and quiz framing: N from the pitch or the number of tables, remainder on the first groups, no skill column. After the deal, one card per team on the tick counter is how you score without writing on a whiteboard that will be erased.

Re-rolls, screenshots, and the sample list

Generate Groups as often as you want while the names are still private. Each click Fisher–Yates shuffles again with Math.random() and deals round-robin. The page does not remember the previous deal, so you cannot “undo” except by shuffling again. Once the cards are public, swap one keep-apart pair by hand rather than re-rolling the room. That is a social rule, not a flag in the component.

Refresh restores Alice, Bob, Charlie, Diana, Eve, Frank, Grace, Heidi (the eight-name sample) and forgets your paste. There is no localStorage key for the groups. Screenshot or copy the cards before you close the laptop. The random picker is the sibling for a single volunteer; it is not a grouping tool and it will not split leftovers into tables.

No fairness guarantee beyond an unbiased permutation of the trimmed list, in the sense Fisher–Yates is unbiased when the RNG is. Math.random() is not an audited raffle RNG. Do not use this tab to draw a prize that must survive a challenge. Use it to split a five-a-side, a quiz night, or an office game, then stop editing the list in public.

Related Tools