Random Group Generator
It’s group-work time, and thirty students are watching you decide who works with whom. Pick names yourself and someone calls favouritism; pull them from a hat and the last group ends up with two people in it. This generator takes the whole job off your shoulders: paste the class list, say how many groups you want — or how many students per group — and it shuffles the list and deals the names out fairly, in about a second.
The detail that matters is in the dealing. Names are dealt one at a time — group 1, group 2, group 3, back to group 1 — so group sizes never differ by more than one, whichever way you split. Ask for groups of four from a class of 26 and you get seven groups of 4, 4, 4, 4, 4, 3, 3. Nobody is stranded in a leftover pair, and no group quietly ends up with six.
You can also list pairs of students who shouldn’t work together, and the tool reshuffles until they’re apart. When you’re happy, copy the groups into your slides or class chat, print them as a handout, or mark a random leader in each group. The names never leave your browser — close the tab and they’re gone.
Random Group Generator
Paste your class list, choose how to split it, and get groups whose sizes never differ by more than one — no leftover pair stranded at the end, in either mode.
How the split works: your list is shuffled with the Fisher–Yates method, using your browser’s cryptographic random numbers, then dealt into groups one name at a time — group 1, group 2, and so on. Dealing in turn is what keeps the sizes within one of each other. If you ask for students per group, the tool makes enough groups to hold everyone without any group going over the size you set, and spreads the shortfall the same way. Random means every arrangement is equally likely — nobody is favoured — but it does not sort by ability or behaviour; the mix in each group is chance, and re-rolling is instant when a split looks wrong. The names you paste stay in this page and are gone when you close it.
How It Works
The list is shuffled with the Fisher–Yates method, the standard unbiased shuffle: working from the last name to the first, each name swaps places with a randomly chosen name at or before it. The random numbers come from your browser’s cryptographic generator, with the biased tail values redrawn, so every possible ordering of your list is equally likely. Nobody — including you — can predict or steer the result.
Then the shuffled list is dealt into groups in turn. Dealing, rather than chopping the list into blocks, is what guarantees the sizes: with 26 names and 5 groups, the deal naturally produces 6, 5, 5, 5, 5. In students-per-group mode the tool first works out how many groups it needs to hold everyone without any group going over your size — 26 students at 4 per group needs seven groups — then deals the same way, so the two short groups are 3s spread by the deal, not a pair left over at the end.
Keep-apart pairs work by honest retries: the tool shuffles and deals again, up to 100 times, looking for a split where no listed pair shares a group. If it finds one — it usually does within a few tries — that’s your split. If 100 tries aren’t enough, it keeps the attempt with the fewest clashes and tells you exactly which pairs it couldn’t separate, so you can add a group or drop a pair rather than wonder.
One thing to be clear about: random is fair in method — every arrangement is equally likely, so no student is favoured — but the tool doesn’t know your class. It can’t balance ability, behaviour or friendships, and a random mix will sometimes put three strong students together by pure chance. That’s what the re-roll button is for.
How To Use It
- Paste your class list into the box, one name per line. A column copied from a spreadsheet works as-is; numbering, bullets, commas and semicolons are all handled, and the counter shows how many names it found. In a hurry to test it? Press “Load a sample class”.
- Choose “Number of groups” if you know how many tables you have, or “Students per group” if you know the team size you want — then enter the number.
- If two students shouldn’t be together, tick “Keep some students apart” and list each pair on its own line, separated by a comma.
- Tick “Mark one leader per group” if you want a name picked at random in each group to run it.
- Press “Make Groups”. Not keen on the mix? Press “Make New Groups” for a fresh shuffle — it takes a second.
- Press “Copy All Groups” to paste the result into a slide, document or class chat, copy a single group from its card, or press “Print Groups” for a clean handout with just the groups on it.
Worked Example
Say you’re a teacher with 26 students and you want groups of four for a project. You paste the roster, choose “Students per group”, enter 4, and press “Make Groups”.
Twenty-six doesn’t divide by four, and this is where the dealing matters. The tool makes seven groups — the smallest number that holds 26 students without any group going over four — and deals the shuffled names into them: sizes 4, 4, 4, 4, 4, 3, 3. Every student is in a working group; the two groups of three are a fair spread, not a pair left standing at the end. (Split the same class by “Number of groups” instead — say 5 groups — and you get 6, 5, 5, 5, 5. A class of 24 at 4 per group comes out as exactly six groups of four.)
Now add one constraint: two of your students shouldn’t be paired this week. You tick “Keep some students apart”, list the pair, and generate again. The status line confirms “All 1 pair kept apart” — or, if you’d asked for something impossible, it would name the pair it couldn’t separate instead of quietly putting them together.
The group membership itself is different every time — that’s the point of a shuffle — so this example is about the sizes and the guarantees, which hold on every single run.
Who It Is For
Teachers splitting a class into project teams, lab partners, reading circles or discussion groups — especially with the awkward class sizes, 26 or 29, that never divide evenly. Trainers and workshop facilitators breaking a room into table groups. Coaches and club leaders drawing fair teams without a playground-style pick. Anyone, really, who has a list of names and needs it in groups without an argument about how the groups were chosen.
Why Use This Tool
- No stranded leftovers, in either mode: sizes never differ by more than one whether you split by group count or by group size — 26 students at four per group makes seven working groups, never six groups and a pair.
- A shuffle you can defend: Fisher–Yates with cryptographic randomness means every arrangement is equally likely, so “the computer did it” is a complete answer to a fairness complaint.
- Keep-apart pairs, handled honestly: list the pairs who shouldn’t work together and the tool reshuffles until they’re apart — and if it can’t, it tells you which pair beat it instead of hiding the clash.
- Straight into your lesson: copy all groups or a single group into slides or the class chat, print a clean handout, and mark a random leader per group if the task needs one.
FAQ
How does the generator make the groups?
It shuffles your list with the Fisher–Yates method, using your browser’s cryptographic random numbers, then deals the names into groups one at a time — group 1, group 2, and so on. Dealing in turn is what keeps every group’s size within one of the others.
What happens when the class doesn’t divide evenly?
The shortfall is spread out, never dumped on the last group. Splitting by number of groups: 26 students in 5 groups gives 6, 5, 5, 5, 5. Splitting by students per group: 26 students at 4 per group gives seven groups of 4, 4, 4, 4, 4, 3, 3 — enough groups to hold everyone, none over the size you set, and no leftover pair.
Is the split really fair?
Fair in the way that matters for choosing groups: the shuffle gives every possible arrangement the same chance, so no student is more likely to land anywhere than anyone else, and nobody can predict or steer the result. What random can’t do is balance ability or behaviour — it doesn’t know your students. If a split looks lopsided, re-roll; if two students must never meet, use the keep-apart list.
Can I keep certain students apart?
Yes. Tick “Keep some students apart” and list one pair per line, names separated by a comma. The tool reshuffles up to 100 times looking for a split where no listed pair shares a group. If that’s impossible — too many pairs, too few groups — it shows the split with the fewest clashes and names the pairs it couldn’t separate.
Are the names I paste stored anywhere?
No. The list lives in this page, in your browser, and nowhere else. Nothing is uploaded, saved or written into the page link, and the names are gone when you close the tab.
Can I print the groups or use them in my slides?
Yes. “Print Groups” opens a clean page with just the groups on it, ready for a handout. “Copy All Groups” copies the full list as plain text for a slide, document or class chat, and each group card has its own copy button if you only need one group.
How does the generator make the groups?
It shuffles your list with the Fisher–Yates method, using your browser’s cryptographic random numbers, then deals the names into groups one at a time — group 1, group 2, and so on. Dealing in turn is what keeps every group’s size within one of the others.
What happens when the class doesn’t divide evenly?
The shortfall is spread out, never dumped on the last group. Splitting by number of groups: 26 students in 5 groups gives 6, 5, 5, 5, 5. Splitting by students per group: 26 students at 4 per group gives seven groups of 4, 4, 4, 4, 4, 3, 3 — enough groups to hold everyone, none over the size you set, and no leftover pair.
Is the split really fair?
Fair in the way that matters for choosing groups: the shuffle gives every possible arrangement the same chance, so no student is more likely to land anywhere than anyone else, and nobody can predict or steer the result. What random can’t do is balance ability or behaviour — it doesn’t know your students. If a split looks lopsided, re-roll; if two students must never meet, use the keep-apart list.
Can I keep certain students apart?
Yes. Tick “Keep some students apart” and list one pair per line, names separated by a comma. The tool reshuffles up to 100 times looking for a split where no listed pair shares a group. If that’s impossible — too many pairs, too few groups — it shows the split with the fewest clashes and names the pairs it couldn’t separate.
Are the names I paste stored anywhere?
No. The list lives in this page, in your browser, and nowhere else. Nothing is uploaded, saved or written into the page link, and the names are gone when you close the tab.
Can I print the groups or use them in my slides?
Yes. “Print Groups” opens a clean page with just the groups on it, ready for a handout. “Copy All Groups” copies the full list as plain text for a slide, document or class chat, and each group card has its own copy button if you only need one group.