Random Group Maker
Paste a list of names and split it into random groups, by the number of groups or the number of people in each. Keep chosen people apart or together, reshuffle, then copy or print. The names never leave your browser.
How to Use
- Paste or type the names, one per line (a single line separated by commas works too).
- Choose Number of groups or People per group and enter the number. With people per group, choose what happens to the extra people.
- Optional: add Keep apart lines (such as
Ana, Ben) for people who must be in different groups, and Keep together lines for people who must share a group. - Press Make groups. Press Reshuffle for a different random split with the same rules.
- Use Copy groups to paste them into a message or slide, or Print for a sheet with only the groups on it.
Worked Example
By number of groups. 26 students into 4 groups: 26 ÷ 4 = 6 remainder 2, so every group gets 6 and two groups get one more. The split is 7, 7, 6, 6. Asking for groups of 6 instead gives ceil(26 ÷ 6) = 5 groups spread as 6, 5, 5, 5, 5, because no group may go above 6.
Choosing what happens to leftovers. 10 people in groups of 4 does not divide evenly. Spread evenly: ceil(10 ÷ 4) = 3 groups of 4, 3, 3. One smaller group: 4, 4, 2. Join other groups: floor(10 ÷ 4) = 2 groups, so the 2 extras join them for 5, 5.
The common mistake: rules that cannot all be kept. With 3 groups, the line Ava, Chloe, Dev, Eli under Keep apart asks for four people in four different groups, which is impossible. The tool says so rather than quietly breaking one rule. Split it into pairs, or make 4 groups.
Show Work
Formulas
Why Random Groups Help
When students choose their own groups, friends tend to cluster together and the same students tend to be left until last. Assigning groups at random, and visibly so, takes that choice out of the room. Rotating random groups also spreads students across more classmates over a term, which is the point of structured cooperative learning methods such as Johnson and Johnson’s, where each member has a role and is accountable to the group.
The shuffle here is the Fisher–Yates method, first described by Ronald Fisher and Frank Yates in 1938 and adapted for computers by Richard Durstenfeld in 1964. Each step swaps one name with a uniformly chosen earlier one, which makes every one of the n! possible orders equally likely, as long as the random numbers are unbiased. That is why this page uses the browser’s cryptographic generator and rejects values that would favour small numbers.
About This Tool
This tool splits a list of names into random groups by number of groups or by group size, keeps chosen people apart or together, and lets you reshuffle, copy or print the result. Group sizes never differ by more than one unless you choose one smaller group.
Your names never leave your browser. The page sends nothing over the network and stores nothing: no account, no saved list, no cookie with the names. Reloading the page clears them, so keep your own copy of the class list.
It is made for teachers, coaches, workshop leaders and anyone who needs teams quickly and fairly.
Related tools: Wheel Spinner, Dice Roller, and Attendance Percentage Calculator.
Frequently Asked Questions
How are the group sizes worked out?
By number of groups, the people are shared out as evenly as possible: 26 people in 4 groups is 26 ÷ 4 = 6 remainder 2, so two groups of 7 and two of 6. By people per group you choose what happens to the leftovers: 10 people in groups of 4 becomes 4, 3, 3 (spread evenly), 4, 4, 2 (one smaller group) or 5, 5 (extras join other groups).
Is the shuffle really random?
It uses your browser’s cryptographic random number source, crypto.getRandomValues, with rejection sampling so that every order is equally likely, and a Fisher–Yates shuffle. The rules are then met by trying random placements, so the groups are random among the splits that obey them.
Are the names I paste stored or sent anywhere?
No. The page makes no network request with them and saves nothing: close or reload the tab and the list is gone. That makes it safe to use with student names, but keep your own copy of the list.
What if the keep-apart rules are impossible?
The tool says so instead of breaking a rule. Four people who must all be apart need at least four groups, and a keep-together set cannot be bigger than the largest group. If it cannot find a split in 400 random tries, it asks you to remove a rule or change the number of groups.
What happens to repeated names?
Each line is one person. If the same name appears twice, the second becomes “Sam (2)” so both people are placed and you can tell them apart; the page lists the repeats so you can fix the list if it was a mistake.
How do I use the Random Group Maker?
Simply pick your options and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Is it free? Does it work without internet?
Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.
Where does my data go?
Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.
Common Use Cases
Classroom groups
A class of 24 into 6 lab groups of 4, with two students who distract each other kept apart.
Pairs for peer review
Groups of 2 with “Join other groups”: 25 students become 11 pairs and one group of 3.
Sports teams
18 players into 2 teams of 9, reshuffled each week so the teams change.
Workshop tables
40 attendees at tables of 6: spread evenly gives 7 tables, 5 of 6 and 2 of 5.
Keep a buddy together
A new student kept together with a buddy, while the rest of the class is shuffled.
Last updated: