Random Group Generator

Paste a name list, split it into random groups, or draw one person at random.

Blank lines are ignored and each name is trimmed, with a limit of 2000 names per run. Press Ctrl and Enter inside the box to make groups right away.

Split mode

Split into N groups, with leftover names spread over randomly picked groups.

Groups of M people, and the last group takes whoever is left.

How to use

  1. Paste the names, one per line, in any order.
  2. Pick a mode, then enter N for the number of groups or M for the size of each group.
  3. Press "Make groups" and the result appears as one card per group.
  4. Press "Copy all groups" to paste the whole split into a chat or a document.
  5. Press "Pick one person" for an equal-chance draw from the same list.

FAQ

Are the groups really random?
Yes. Every run shuffles the list with values from crypto.getRandomValues, and rejection sampling removes modulo bias. Math.random is used only when the cryptographic source is unavailable.
What happens when the names do not divide evenly?
With a group count, sizes differ by at most one person and the extra names go to randomly picked groups. No group comes out empty. With a group size, the last group holds whoever is left over.
Is my name list uploaded or stored?
No. The list and the groups stay inside this page. A refresh or a closed tab clears them, and nothing is sent to a server or saved in local storage.
What about duplicate names?
Duplicates are kept as they are. Two entries with the same text count as two separate people, so they can land in different groups or in the same one.

How to use

  1. Paste and tidy the list

    Paste names into the box, one per line. Blank lines are dropped, each name is trimmed, and the order you typed stays as it is.

  2. Choose a split mode

    Use group count when the number of teams matters, or group size when the size of each team matters. The matching number field turns editable when you switch.

  3. Press Make groups

    The list is shuffled first and then cut by the rule you picked. Every group gets its own card with the group number and the head count.

  4. Copy the result or draw one name

    Copy all groups puts the whole split on your clipboard for a chat message. Pick one person draws a single name from the same list with an equal chance.

About this tool

This tool cuts one name list into random groups in two ways. With a group count, it works out a base size first. Leftover names go to randomly chosen groups, so sizes differ by at most one person. With a group size, it fills groups of M people and lets the final group hold whoever is left. No group ever comes out empty, and group numbers run from one upward. Duplicate names are kept as typed, so two identical entries count as two separate people.

Teachers, team leads and shift planners use it for everyday splits. A class list becomes a set of small groups in seconds, which saves the paper-and-draw routine. For team building, split by group count first and let each team pick a captain in the open. When one person has to be chosen, the Pick one person button gives every name the same chance. The winner appears highlighted on the page. All of the work happens in the browser, so the list never leaves the device, and a refresh clears everything.

How it works

Fairness here rests on the shuffle, not on the cut. The list is walked from the last position to the front. Each step swaps the current entry with a uniformly chosen position from the remaining prefix. That routine is the Fisher-Yates shuffle. A list of n names has n factorial possible orders, and every order is equally likely. Mapping a 32-bit random value onto an index with a plain modulo would tilt the odds. Values in the last partial block are therefore rejected and redrawn. After the shuffle the list is simply sliced in order, and the cut points carry no bias of their own.

Even group sizes matter in practice. If a split dumps every leftover name into the last group, one team ends up visibly larger and the task load looks unfair. Handing the remainder to randomly chosen groups keeps the difference at one person at most, which looks balanced and works out that way too. A fixed group size has a different trade-off: the final group may hold fewer than M people, because the total does not always divide. The single-name draw shares the same random source as the grouping, so each name holds a one-in-n chance with no hidden weighting.

When to use it

  1. Classroom group work

    Paste the class list, set the number of groups and press the button. Sizes differ by at most one student, and the result can go straight onto the projector so everyone sees the draw. Copy the text into the class chat for the record.

  2. Team building squads

    Feed in the member list and split by group count, or fix a group size when each squad should stay small. Press Copy all groups and drop the text into the event chat, then let each squad choose a captain and a name.

  3. Duty rosters and draws

    Split the duty list into small groups and paste the result into a roster sheet. When a shift lead has to be chosen, Pick one person draws a single name. The winner is highlighted on the page. Everyone can see the same draw, which keeps the roster fair and easy to explain.

Tips & tricks

  • Names can carry extra labels such as a class or a department, and the groups keep that text exactly as typed.
  • Change the group count and press Make groups again for a fresh shuffle, because each run ignores the previous result.
  • Clean duplicates out of the list first so nobody ends up in two groups at the same time.

Things to watch

  • Two names minimum

    Grouping needs at least two names, and the page says so when the list is shorter. The single-name draw has no such limit. Check for stray header rows or blank lines before you group, because any text in the box counts as a name.

  • Group count above head count

    Asking for five groups from three names stops with a message instead of building empty groups. Add more names first, or switch to group size and set it to one person per group. An empty group would only waste a card on the page.

  • Results cannot be reproduced

    Every press of Make groups reshuffles, so the same list and settings give a different split each time. Copy the text or take a screenshot when the result needs to be kept. The page stores no history, and a refresh clears the cards.

Related Tools