Split a list into groups

Five jobs from one list: even teams, groups of a fixed size, pairs, secret Santa and a random order. Everything runs in the browser and the list is never sent anywhere.

Runs in your browser — the list is not sent anywhere

Five jobs

What each mode does

Into N groups. Splits evenly: when people do not divide exactly, the remainder is handed out one at a time starting with the first group. Ten people across three teams become 4, 3 and 3 — groups never differ by more than one person.

By group size. The other way round: you say how many people per team and the number of teams follows. The last one may be short — which is fairer than quietly dropping the extras.

Into pairs. Sparring, interviews, peer review. With an odd count the last person is left without a pair, and the generator says so plainly.

Secret Santa. Builds a single closed circle: everyone gives to the next person, the last gives to the first. Nobody draws themselves, and there are no isolated pairs giving only to each other.

Running order. Simply a shuffled list: order of performances, duty rosters, turn order.

How it works

Why the split is fair

The list is shuffled with the Fisher–Yates algorithm: at every step the current element swaps with a random one from those remaining. It is the only way to get a genuinely uniform permutation — the popular “sort with a random comparator” gives no such guarantee.

Randomness comes from crypto.getRandomValues, the same source that builds the passwords on this site. Plain Math.random() is not good enough for a draw: its state can be reconstructed from a few outputs, which makes the next result predictable.

Nothing you type leaves your device. If you need a result you can show to outsiders and prove you did not reshuffle until it suited you, use the winner picker: there the list is committed in advance and the outcome is verifiable by any participant.

Secret Santa: one important detail

Whoever presses the button sees the entire gifting circle. To keep the surprise for yourself as well, ask someone outside the game to press it — or send each person only their own line without showing the rest.

Questions

Frequently asked questions

How is the remainder handled when it does not divide evenly?

Extra people are handed out one at a time starting with the first group: ten people across three teams become 4, 3 and 3. The largest and the smallest group never differ by more than one person, which is the fairest split possible.

Can secret Santa assign someone to themselves?

No. We build a single closed gifting circle: the first gives to the second, the second to the third and so on, with the last giving to the first. Nobody draws themselves, and there are no closed pairs where two people only give to each other while the rest are left out.

Does the list go anywhere?

No, the whole computation runs in your browser. If you need a public result that outsiders can check, use the winner picker: there the list is committed on the server and the outcome is verifiable by any participant.

How random is the split?

The list is shuffled with the Fisher–Yates algorithm on the cryptographic generator — the same one that builds the passwords. Plain Math.random() is not good enough for a draw: its state can be reconstructed from a few outputs.

What happens to the odd person when splitting into pairs?

The last participant is left without a pair and we say so honestly. Usually they join a pair as a third or take the host role — that is your call, and the generator does not hide the situation.

Next

Other tools

Copied