Random Group Generator (By Count or Group Size)
Splitting a class or a team into groups by hand always looks fairer than it is. Paste the list, choose how many groups or how many people per group, and get a random split with no group more than one person off from the rest.
Published: / Published by the HakoTools team
How it works
What is this group generator?
A tool that takes a pasted list of names and splits it into random groups, either by how many groups you want or by how many people should be in each one. Everything runs in your browser, so the list never leaves your machine.
It covers the two ways a split usually gets specified: a fixed number of tables or breakout rooms (group count), or a fixed capacity per team (group size), with the tool working out the other number for you.
How to use it
- Paste the names, one per line (commas also work)
- Choose Number of groups or People per group and enter the number
- Press Make groups to see the split
- Press Shuffle again for a new split of the same list, or Copy results to paste it into chat or email
What happens when the count doesn't divide evenly?
No group ends up more than one person off from any other. Names are shuffled first, then dealt out one at a time into each group in turn, the way a deck of cards gets dealt. 10 names into 3 groups comes out 4-3-3, never a group of 4, a group of 4, and a leftover group of 2.
In People per group mode, the number you enter is the most a group can hold. 10 names at "4 per group" makes 3 groups (10 ÷ 4 rounded up), not 2 groups of 5.
Why do I keep getting grouped with the same person?
Because each shuffle is completely independent of the last, so a repeat is chance, not a pattern. Split 30 people into 6 groups of 5, and any one other person shares your group of the remaining 4 seats out of 29 candidates: 13.8% per split. Run that split 4 times and the chance you land with them at least once climbs to 44.8%.
| Setup | Same group as a given person (1 split) | At least once in 4 splits |
|---|---|---|
| 20 people into 4 groups of 5 | 21.1% | 61.2% |
| 30 people into 6 groups of 5 | 13.8% | 44.8% |
| 40 people into 8 groups of 5 | 10.3% | 35.1% |
There is no setting that gets that number to zero. If a fresh mix matters, keep the previous result (Copy results makes this easy) and reshuffle only when the overlap is obviously too heavy.
How is the shuffle done?
With a Fisher–Yates shuffle, the standard algorithm for producing every possible ordering with exactly equal probability. It works from the end of the list backward, swapping each position with a random earlier (or equal) one, so the order names were typed in has no effect on which group anyone lands in.
Is the randomness behind the shuffle trustworthy?
For splitting a class or a team, yes: the Fisher–Yates shuffle above runs onMath.random(), the browser's ordinary random number generator, and every ordering really does come out equally likely. What it isn't is cryptographically secure, so it's the wrong choice for anything where a group assignment doubles as a draw with a prize attached — say, who gets the good project or a bonus tied to their group. For that, use a draw method someone in the room can't quietly reverse-engineer.
Group count or group size: which should I set?
- A fixed number of tables, rooms, or stations: use Number of groups. 30 students into 6 discussion tables becomes six groups of 5
- A fixed capacity per team: use People per group. 5-a-side football needs groups of 5; the tool works out how many teams that makes
- Pairing people up: set People per group to 2. An odd count leaves one group of 3 rather than dropping anyone
Notes
- At least 2 names are required. Setting more groups than names is rejected
- Duplicate names are kept as separate people (useful for identical first names)
- Splitting is fully random; pinning two specific people together or apart isn't supported. Copy the result and adjust it by hand if that's needed
- Nothing is saved. Reloading the page clears the list and the result
- Need to pick a single winner from a list instead? Try the decision wheel. For rolling numbers or a quick coin call, see dice & coin flip
Frequently asked questions
- Should I set the number of groups or the size of each group?
- Use group count when a fixed number of tables or breakout rooms exists (say, 4 rooms for 24 people). Use group size when a fixed capacity per group exists instead (5 players per team, 2 per pair), and let the tool work out how many groups that makes.
- What happens when the names don't divide evenly?
- Every group ends up within one person of every other group. Names are shuffled and then dealt out one at a time, round-robin style, so 10 people into 3 groups becomes 4-3-3, never a leftover group of 2.
- Is my list of names uploaded anywhere?
- No. Parsing and grouping both happen in your browser, and nothing is sent to a server.
- Can I copy the result into a chat or email?
- Yes. Copy results puts a plain-text list, one group per section, on your clipboard, ready to paste into Slack, email, or wherever the group needs to see it.
Related tools
Random
Free Raffle Ticket Generator (Set Winner Count, Print)
Generate raffle tickets with a fixed number of winners, no duplicates. Draw on screen, or print fold or numbered tickets to hand out. Free, in browser.
Random
Bingo Card Generator (Custom Number Range, 3x3-5x5)
Generate up to 100 unique numeric bingo cards at once. Choose 3x3, 4x4 or 5x5 and any number range, not just 1-75. Print-ready. Free, in your browser.
Random
Dice Roller & Coin Flip (1-10 Dice, Custom Sides)
Roll 1 to 10 dice with 2 to 100 sides (d4 to d100), or flip up to 10 coins. Pick a preset or custom sides. Free, in your browser, nothing sent anywhere.
Random
Decision Wheel Spinner
Spin a wheel to pick one option at random, then drop the winner and spin again to build an order. 2 to 100 options, weighted by repeats. Free, in-browser.