Random Group Generator
Paste your names, one per line, say how many groups you want or how big each group should be, and press Generate Groups. Everyone is shuffled and dealt into a group, with sizes as even as possible. Regenerate for a new split and copy the lot in one click. Free, no sign-up; your names stay in your browser.
0 names
Split by
How to Use the Random Group Generator
- 1. Enter the names. Type or paste one name per line. Blank lines are ignored and a counter shows how many names it found.
- 2. Choose how to split. Number of groups makes exactly that many groups. Group size sets the largest group you will accept, and the tool makes as many groups as that needs. Then enter the number.
- 3. Press Generate Groups. The groups appear as numbered cards with their sizes, plus the number of names, the number of groups and the size of the largest group.
- 4. Regenerate or copy. Regenerate reshuffles from the same names. Copy All puts every group on your clipboard as plain text, headed Group 1, Group 2 and so on, and Clear empties the box.
How Uneven Numbers Are Handled
The names are shuffled with the Fisher–Yates algorithm and dealt in order. With N names and G groups, every group gets ⌊N ÷ G⌋ names and the first N mod G groups get one more, so sizes never differ by more than one. In Group size mode the tool first works out G = ⌈N ÷ size⌉ and then spreads the names evenly, so no group is larger than the size you set, but it also avoids leaving one person alone in a last small group.
Examples
10 names, 3 groups
Groups of 4, 3 and 3
10 names, size 4
⌈10 ÷ 4⌉ = 3 groups, so again 4, 3 and 3 — not 4, 4 and 2
13 names, size 4
⌈13 ÷ 4⌉ = 4 groups of 4, 3, 3 and 3
5 names, 8 groups
The number of groups is capped at the number of names: five groups of one
How Many Different Splits Are There?
Quite a few, which is why regenerating gives a real change. Splitting 12 names into 3 groups of 4 can be done in 5,775 ways, and 12 into 4 groups of 3 in 15,400. For a class of 24 in 4 groups of 6 there are 96,197,645,544. Your results depend on the shuffle, which uses your browser's ordinary random-number generator, so it is fine for classroom use but not intended for anything with money at stake.
If you re-split every week, any two particular students end up together with probability (s − 1) ÷ (N − 1) for groups of size s in a class of N. In a class of 24 with groups of 6, that is 5 ÷ 23, or about 22%, each time, so the same pairs will meet again sooner than you might expect. Regenerate until you are happy with the mix.
What It Cannot Do
- It sees only names. There is no way to balance groups by ability, language or friendship, or to keep two students apart. If a split is not workable, press Regenerate, or swap two names by hand in your copy.
- It does not save anything. Reloading clears the names and groups, so copy the result first.
- Repeated names are merged. Lines that match ignoring capital letters and edge spaces count once, and a note under the box says how many were removed. Two real people with the same name need to be told apart, for example Sam K. and Sam L..
- Group names are fixed. Groups are numbered; rename them in your own document.
Which Tool Do You Need?
| If you want… | Use |
|---|---|
| Everyone split into teams or small groups | This Random Group Generator |
| One name, or a few, picked from the list | Random Name Picker |
| Students placed in seats, with pairs kept apart | Seating Chart Generator |
| A gift exchange where nobody draws themselves | Secret Santa Generator |
| Players seeded into a knockout schedule | Tournament Bracket Generator |
Frequently Asked Questions
- How do I split names into random groups?
- Paste the names, one per line, choose Number of groups or Group size, type the number, and press Generate Groups. The names are shuffled and dealt into groups, which appear as numbered cards.
- What happens when the names don't divide evenly?
- The leftover names go one each to the first groups, so no two groups differ in size by more than one. Ten names in three groups gives 4, 3 and 3.
- What is the difference between the two modes?
- Number of groups fixes how many groups there are and spreads the names over them. Group size sets a maximum: the tool makes as many groups as are needed to stay at or under that size, then balances them, so ten names with a size of 4 gives 4, 3 and 3, not 4, 4 and 2.
- Are the groups really random?
- Each shuffle uses the Fisher–Yates algorithm, which treats every ordering alike, driven by your browser's standard random-number generator. That is ample for classroom use. It is not a certified draw, so do not use it for prizes that need an audit trail.
- Can I keep certain people apart or together?
- No; the tool only has the names. Regenerate until the split suits you, or use the keep-apart option in the Seating Chart Generator when the question is who sits next to whom.
- Is my list of names stored or sent anywhere?
- No. Shuffling happens in your browser and nothing is uploaded or saved. The names and groups disappear when you leave or reload the page.