Random Group Generator
| People | Teams | Sizes |
|---|---|---|
| 9 | 3 | 3-3-3 even |
| 10 | 3 | 4-3-3 - team 1 takes the extra |
| 11 | 4 | 3-3-3-2 |
Drawing teams out of a hat has two failure modes: the hat is not really random, and nobody can prove it was. This generator fixes both. Names are shuffled with the browser's cryptographic random source - the same class of randomness used for keys, not the casually biased sort-by-random trick - and then dealt round-robin, one card at a time, so groups come out balanced whenever the count divides and predictably close when it doesn't.
The deal is deterministic once the shuffle happens: with 9 people and 3 teams everyone gets a trio, with 10 the first team takes the extra, with 11 and 4 teams you get 3-3-3-2. That's not a quirk - it's the arithmetic of round-robin dealing, and the table below shows exactly how any remainder lands. The Share this draw button hands you a link that carries the roster and settings, so a classroom, a pub quiz, or a Saturday league can all see the same draw.
How to use
- Paste your names into the box, one per line - a class roster, a chess club, a wedding guest list. Blank lines are ignored, duplicates are your own problem to spot, and the order you paste in is the order the deal walks through before shuffling. No signup, no upload: the list never leaves your browser.
- Set the number of teams (2 to 20) and press Shuffle teams. The result panel shows people per team, the group count, and a balance readout; each team's roster lands in the list below, ready to read aloud or screenshot. Redraw freely - every press is a fresh cryptographic draw, so rerolling until the boss lands on your team is between you and your conscience.
- Use Share this draw to freeze the outcome: the button builds a link with the roster encoded in it (and hands it to your phone's share sheet when one exists), so the draw is reproducible for anyone who opens it. Useful when the losing team demands a recount - the link is the recount.
Frequently asked questions
How does the generator decide who gets the extra person?
Round-robin dealing, first team first: names are dealt one at a time to teams 1, 2, 3... and when the deck runs out, whichever teams got an earlier turn hold the extras. Ten people into three teams is 4-3-3 because team 1 received the first and seventh card; eleven into four teams is 3-3-3-2. The extras are never random themselves - which matters, because a draw where the odd person lands randomly feels rigged to whoever drew the short straw twice. If you'd rather spread the extras, shuffle the team count or the roster order and draw again.
Why not just sort the list randomly with Math.random()?
Because the lazy one-liner - sort the array with a random comparator - produces a shuffle that favors some orders over others, and different browsers make it differently wrong: the result depends on how each engine implements sort, which is precisely what the JavaScript standard refuses to guarantee. The documented Math.random page says its source is not cryptographic. This generator uses the browser's crypto-grade random instead (getRandomValues), which passes uniformity tests sort-shuffling fails. For party games either would do; for a tournament bracket or a graded classroom draw, use the shuffle whose fairness you can cite.
Is this random enough for anything serious?
It is honestly random, but know its class: the browser's crypto source is nondeterministic and unseeded, so no one - including you - can re-run the same draw twice from the same inputs. That is the right property for fairness and the wrong one for bookkeeping. If you need a draw you can replay for audit, take the Share this draw link at draw time: it pins the roster and settings as output, not as a re-seedable state. For cryptographic key material, use a tool designed for it; for team draws, this is already stricter than the situation requires.
What's the best way to split a class of 28 into seven even groups?
Type 7 teams and the deal does it perfectly - 28 divides by 7, so every group gets exactly 4, and the round-robin walk means the groups are interleaved across your paste order (group 1 gets names 1, 8, 15, 22 before shuffling scrambles it). Two classroom tricks: paste the roster in grade order if you want ability spread across groups after the shuffle, or paste it grouped by ability if you want the shuffle to randomize clusters. And for lab partners where some pairs can't work together, draw first, then swap names manually - the share link preserves the original draw as your baseline.
Can I weight the draw or keep certain people apart?
Not directly - and that is deliberate, because weighting is how draws stop being random. The honest workflow for constraints: draw with the generator, then make manual swaps for the two people who can't be grouped (siblings, ex-teammates, the intern and the manager), keeping group sizes intact. A swap between two groups preserves the balance arithmetic exactly. If you routinely need exclusion rules, do the draw in passes - split the special cases into their own draw first, then fold the results in - rather than looking for a tool that quietly bakes in favorites.