Free · Secure RNG · Balanced teams

Random Group Generator — Split Names into Fair, Balanced Teams

Split any list of names into random groups or teams instantly. Choose by number of groups (e.g. 4 teams) or by group size (e.g. 4 per group). Pin a specific name to a specific group with the #N syntax. Every group is generated with cryptographically secure randomness and group sizes come out balanced to within one member. Copy or export as CSV.
👥 Balanced by count or size 📌 Pin members to groups 🔒 100% in-browser

Random Group Generator

Paste your names, choose a split rule, generate groups.
0 names

💡 Pin a name to a group: add #1 after the name — Alice #1 always goes to Group 1.

💡 Sample lists — tap to load
Add names to see group sizes

Ready to split your list

Paste your names above, choose how to split them, and click Generate Groups.

1 Add names
2 Pick split rule
3 Generate

What is a random group generator?

A random group generator takes a list of names and splits it into smaller groups at random. You provide the names — a class roster, a workshop attendee list, a sports squad, a hackathon sign-up sheet — and the tool shuffles them fairly and distributes them into teams. Group sizes come out as balanced as the math allows.

It's the digital equivalent of writing every name on a slip of paper, putting the slips in a hat, and drawing them out one by one to form teams. Except it happens in a hundredth of a second, requires no paper, and the fairness is provable rather than assumed.

Random group generators are used constantly in classrooms, workshops, and offices:

  • Teachers splitting a class into project teams, reading circles, or discussion groups.
  • Coaches dividing a sports squad into balanced practice teams.
  • Workshop facilitators breaking a large cohort into small-group breakout rooms.
  • Hackathon organizers forming teams from a participant pool to mix skill levels and networks.
  • Team-building facilitators preventing the same cliques from forming at every event.
  • Board game hosts dividing attendees into tables for tournament play.

💡 Random group generator vs. random name picker. A random name picker selects a subset of names from your list — it picks winners. A random group generator uses every name in your list — it assigns each name to exactly one group. Use the picker for raffles and giveaways; use the group generator for team formation and classroom breakouts.

How to use the random group generator

  1. Add your names. Paste a column from Excel, Google Sheets, or any text source — one name per line. Or use the Add one by one tab to enter names as chips.
  2. Choose a split rule. Pick By number of groups if you already know the team count (e.g. 4 teams). Or By group size if you know how many members each group should have (e.g. 4 per group).
  3. Enter the value. Type the count (2 to 200) or size (2 to 50). A live preview below the input tells you exactly how many members each group will receive before you click Generate.
  4. Optional: pin specific members. Add #N after a name to force it into group N — for example Alice #1 always lands in Group 1.
  5. Click Generate Groups. The tool shuffles your list with a cryptographically secure random source and distributes names evenly.
  6. Copy, rename, or export. Click any group name to rename it inline. Copy individual groups, copy the whole setup, or download as CSV.

The two split modes explained

There are two ways to think about random group distribution, and the difference matters when your total isn't perfectly divisible.

Split by number of groups

You say "I want 5 groups", and the generator divides the list into exactly 5 groups. Each group receives either N or N+1 members, where N = total ÷ groups rounded down. The extra members are distributed one each to the first groups, so the largest and smallest groups differ by exactly one.

Example: 23 names into 5 groups → 5 + 5 + 5 + 4 + 4 (three groups of 5, two groups of 4).

Split by group size

You say "I want 4 members per group", and the generator creates as many full groups of 4 as possible, plus one smaller remainder group for the extras. This is the mode most teachers use when they've been given a fixed team size.

Example: 23 names into groups of 4 → 4 + 4 + 4 + 4 + 4 + 3 (five full groups of 4, one remainder group of 3).

Total names4 groups (by count)Size 4 (by size)
123 + 3 + 3 + 34 + 4 + 4
205 + 5 + 5 + 54 + 4 + 4 + 4 + 4
236 + 6 + 6 + 54 + 4 + 4 + 4 + 4 + 3
257 + 6 + 6 + 64 + 4 + 4 + 4 + 4 + 4 + 1
318 + 8 + 8 + 74 + 4 + 4 + 4 + 4 + 4 + 4 + 3

⚠ Small remainder groups are expected. If your total isn't divisible by the group size, the last group will be smaller — that's mathematically unavoidable if you want everyone to stay in the pool. If you prefer groups that are all nearly the same size, switch to By number of groups instead.

How to split students into random groups

Teachers are the most frequent users of group generators, and the workflow is a little different from other use cases. Here's the pattern that works best in a classroom:

  1. Paste the class roster. Copy the names from your gradebook or attendance system and paste them one per line. If your LMS lets you export a CSV, use that — the tool handles pasted text one name per line.
  2. Choose "By group size" for fixed-size teams. Most cooperative learning activities specify a team size — "teams of four" or "pairs." Choose By group size and set the size.
  3. Pin the student leaders. If you've assigned a team captain for each group, use the #N syntax to pin them. Alice #1 keeps Alice in Team 1, and the rest of the team is filled in randomly around her.
  4. Balance skills and needs. Pin any student who needs a specific group (a designated helper, a student with an accommodation, an English-language learner paired with a bilingual peer).
  5. Regenerate freely. If you want to see different groupings, click Regenerate. Every generation is a fresh uniform draw. Don't regenerate "until it feels right" — the first draw was already fair.
  6. Print or share. Use the Print button for a paper copy, or Copy all to paste the groups into your lesson plan or class messaging channel.

How to split names into teams

For non-classroom scenarios — sports, hackathons, workshops, event tournaments — the pattern shifts slightly:

  • Sports teams: Choose By number of groups so every team has the same size. Balanced sizes prevent mismatches in pickup games and intramural leagues.
  • Hackathons: Pin one experienced developer to each team to avoid a "stacked" team winning by default. Then let the rest draw randomly to break up pre-existing friend clusters.
  • Workshops: Use By group size with a size that matches your breakout rooms — 4 to 6 for small-group discussions, 8 to 12 for larger collaborative exercises.
  • Board game tables: Choose By number of groups and rename each group to the table name or host name. Balance sizes so no table is short a player.

How fairness is guaranteed

Every generation follows a three-step process:

  1. Shuffle. Your list is shuffled with the Fisher–Yates algorithm, using crypto.getRandomValues() — the browser's cryptographically secure random source — as the randomness input. Fisher–Yates produces a uniform permutation: every possible ordering of the names is equally likely.
  2. Distribute. The shuffled names are then assigned to groups in round-robin order. Because the shuffle is uniform, every possible assignment of members to groups is equally likely.
  3. Balance. Group sizes are checked against the split rule. Extra members are distributed one at a time to the smallest group until every name has a home, so sizes differ by at most one.

The result: no one can predict which names will end up together, and no one can accuse the tool of favoritism. If you regenerate, you get a fresh uniform shuffle every time. This is not a "looks random" shuffling heuristic — it is a mathematically proven unbiased permutation.

Group size ≈ ⌊ total ÷ groups ⌋ or target size

💡 Why cryptographic randomness matters here. Many group generators use JavaScript's built-in Math.random(), which is fast but technically predictable — its output follows a deterministic pattern based on an internal seed. This tool uses crypto.getRandomValues(), which pulls entropy from the operating system (hardware timing jitter, interrupt timing, device noise). The output cannot be predicted even if the internal state of the program is known. For a classroom, a competition, or a workplace task distribution, that guarantee is worth having.

Pinning members to specific groups

Sometimes a group can't be fully random — you need a specific person in a specific team. Common cases:

  • Balancing skills. Each group needs one experienced programmer, or one fluent English speaker.
  • Team captains. The class captain should lead Group 1.
  • Sibling separation. Two siblings must never land in the same group.
  • Accessibility. A specific student needs to be in the group nearest the teacher's desk.
  • Language spread. A bilingual speaker in each group to help with translation.

To pin a member, add #N after their name in the input list:

Alice #1
Bob
Carol #2
David
Emma #1
Frank
Grace #3

Alice and Emma always land in Group 1, Carol in Group 2, and Grace in Group 3. The remaining names are distributed randomly around them. Pinned members are marked with a small badge in the output so you can see at a glance which members were constrained.

Naming and renaming groups

Every group has a name in its colored header. Three auto-naming styles are available:

  • Team 1, Team 2, Team 3… — the default, familiar for sports and class activities.
  • Group A, Group B, Group C… — letters instead of numbers.
  • Group 1, Group 2, Group 3… — the classic numbered form.

Click any group's name in the output to rename it individually. Type a new name and press Enter — the change is saved immediately. This is useful when one team has a real name ("The Avengers", "Table Alpha") and the rest are still Team 2, Team 3, Team 4. Renamed groups keep their custom name when you regenerate.

Real-world use cases

Classroom group work

Split a class into project teams, reading circles, or discussion groups. Paste the class roster (one name per line), choose "teams of 4", and click Generate Groups. The balanced-size guarantee means no group is left short. If you want a specific student in a specific group, use the pin syntax rather than regenerating and hoping.

Sports teams and P.E.

Randomize teams for pickup games, P.E. classes, or intramural leagues. Group sizes come out balanced, so teams are fair. This also works well for tournament seeding — split a roster of 32 players into 8 groups of 4 for round-robin play.

Hackathons and coding events

Assign hackathon participants to teams, breaking up existing friend clusters to encourage cross-network collaboration. Paste the attendee list (or import from your registration system as CSV) and generate the teams in one click. Pin an experienced developer to each team to balance skill levels.

Workshops and conferences

Break a large workshop cohort into small-group breakout rooms. Group sizes balance automatically, and the CSV export lets you assign each room's facilitator a printable list. Rename the groups to match the actual room numbers ("Room 101", "Room 102").

Board games and tabletop sessions

Split a game-night crowd into multiple tables for tournament play. Group sizes balance so no table is short of players. Copy each group individually to send to each table host.

Team-building and corporate retreats

Random team assignment at corporate events prevents the same cliques from forming every time. Rerun the generator for each session to keep teams fresh. Pin department heads one-per-team to ensure cross-functional groups.

Volunteer and committee assignments

Distribute volunteers across shifts, divide a committee into working subgroups, or randomly assign members to task forces. Use the pin feature to keep a committee chair with a specific working group, or to keep two members who don't work well together separated.

Bible study, discussion, and book clubs

Split a large study group into smaller discussion circles. Group sizes balance, so every circle has enough voices. Pin a facilitator to each circle for guidance.

Common mistakes to avoid

  • Assuming group sizes will be perfectly equal. They're equal or differ by at most one when dividing evenly. When splitting by size, the last group is typically smaller. This is a mathematical consequence of divisibility, not a bug.
  • Regenerating until you "like" the result. Every generate is a fresh uniform draw. Rerunning to get a particular outcome is cherry-picking and destroys the fairness you started with. The first draw was already unbiased.
  • Forgetting pins when a constraint exists. If a specific person must be in a specific group, use #N. Regeneration will never guarantee a specific outcome.
  • Not verifying the count. The number of names is shown live above the textarea. If it doesn't match your expectations, some lines may be empty or contain trailing whitespace.
  • Using pins for two people at once. The pin syntax works per-line, so if you have two pinned members who must be together, put them in the same group number separately (Alice #1 and Bob #1).

Limitations

  • The generator splits a list into groups once. It does not schedule groups across a calendar or plan recurring team rotations.
  • The tool works at the row level of a plain text list. It doesn't parse complex CSV files with quoted commas and multiline fields — trim your data to one name per line first.
  • Very large lists (over 5,000 names) may slow rendering on older phones. The generation itself is fast — the bottleneck is the group card layout.
  • Randomness is client-side. For high-stakes public draws that require an auditable third-party record, use a certified draw service.

Frequently asked questions

How does the random group generator ensure fair groups?

The generator uses crypto.getRandomValues(), the browser's cryptographically secure random source, to shuffle your list with the Fisher–Yates algorithm. Because the shuffle is uniform, every possible ordering of names is equally likely, and every possible assignment of members to groups is equally likely. No one can predict or influence the outcome.

How do I split a class into groups of 4?

Select By group size, enter 4, and click Generate Groups. If your class size isn't divisible by 4, you get some full groups of 4 and one smaller remainder group so no student is left out.

What happens when the total isn't evenly divisible?

When splitting by group count, extra members are distributed one each across the first groups, so sizes differ by at most one. When splitting by group size, you get as many full groups as possible plus one remainder group containing the leftover names.

Can I pin a specific person to a specific group?

Yes. Add #N after their name — for example Alice #1 always lands in Group 1. Pinned names are placed first, then the remaining names are distributed randomly around them.

How do I generate random teams for sports or classroom activities?

Paste your roster, choose By number of groups, and enter the number of teams you want. Sizes come out balanced to within one member. Copy or export the result to share with coaches, students, or players.

Can I name the groups?

Yes. Pick from three auto-naming styles (Team 1, Group A, Group 1), then click any group header to rename it individually. Names you set manually are preserved until you regenerate.

How do I export the groups?

Click Download CSV to save a spreadsheet file with columns for group number, group name, member name, and pinned status. You can also copy all groups as plain text, Markdown, or CSV from the Copy menu.

Does the tool work offline?

Yes. Once the page loads, everything runs in your browser with no network calls. Your names never leave your device.

Is my data saved?

Yes. Names, groups, and settings are stored in this browser's localStorage so they survive a page reload. Nothing is uploaded to any server.

What's the difference between this and a random name picker?

A random name picker selects a subset of winners from your list. A random group generator uses everyone in the list — every name ends up in exactly one group. Use a name picker for raffles and giveaways, and a group generator for team formation, classroom breakouts, and workshop activities.

Sources & methodology

  • Fisher, R. A., and Yates, F. (1938). Statistical Tables for Biological, Agricultural and Medical Research. The Fisher–Yates shuffle algorithm used for uniform random permutation.
  • Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms — analysis of Fisher–Yates and its uniformity proof.
  • MDN Web Docs — Window.crypto.getRandomValues(): specification and security notes on the Web Crypto API.
  • W3C Web Cryptography API Recommendation — normative reference for the randomness source used by this tool.
  • ECMAScript Language Specification — pseudorandom nature of Math.random() compared with the platform crypto API.
Scroll to Top