What is a Secret Santa generator?
A Secret Santa generator pairs up a group of people so that everyone gives a gift to someone else — and nobody gives to themselves. You paste the names, one per line, press the button, and the tool shows the pairs: Asha gives to Rahul, Rahul gives to Priya, Priya gives to Vikram, and so on, until everyone is both a giver and a receiver.
The rule that makes it work is called a derangement: a shuffle of the list where no name stays in its own place. An ordinary shuffle can leave someone matched to themselves, which ruins the game. A derangement cannot — every giver is different from their receiver, by construction, and every receiver gets exactly one gift.
This tool is for offices, families, and friend groups at Christmas. It replaces the hat full of names, the slips of paper, and the person who has to organise it all. Everything runs in your browser — nothing is uploaded, nothing is stored, and there is no account to create. The pairs are shown on screen, so the organiser reads them out or shares them privately.
How Secret Santa pairing works
The method is a shuffle with a check. The tool takes your list of names and shuffles it with a time-seeded random generator. Then it checks whether anyone is matched to themselves — whether the name in position one is also the receiver in position one, and so on down the list. If anyone is, it shuffles again. It repeats until no one is matched to themselves, which is usually the first or second try.
There is a safety net for the rare case where shuffling keeps failing: a rotation by one. If the list is Asha, Rahul, Priya, Vikram, Meera, Arjun, the rotation gives Asha to Rahul, Rahul to Priya, Priya to Vikram, Vikram to Meera, Meera to Arjun, and Arjun to Asha. A rotation is always a derangement, because every name moves one place and nobody stays put. The tool uses it only if the shuffle has not worked after 200 tries, which is vanishingly unlikely.
The randomness is honest but not cryptographic. The seed is the current time in milliseconds, and the shuffle is a standard Fisher-Yates pass, which gives every pairing an equal chance. That is plenty for a gift exchange — and it is not meant for passwords, lottery picks, or anything where the stakes are real. For secrets, use a password generator instead.
The rules of Secret Santa, and the numbers
Secret Santa needs at least two people, and it works best with five or more. With two people, there is only one derangement: they give to each other, and the secret is no secret at all. With three people, there are two derangements. With six people, there are 265 derangements out of 720 possible shuffles — about 37% of shuffles work, so the tool usually finds one on the first try.
The classic rules are simple: everyone gives one gift, everyone receives one gift, nobody knows who their giver is until the gift arrives, and there is a budget everyone agrees on — often a small fixed amount, so nobody feels outspent. The generator handles the pairing; the group handles the budget, the date, and the secrecy.
One rule the tool enforces and the hat does not: nobody draws themselves. In a hat draw, someone can draw their own name and has to put it back and draw again, in front of everyone — which is awkward and gives the game away. The generator checks the whole pairing before showing it, so the awkward moment never happens. To pick one item from a list of your own, try the random picker instead.
A worked example: six names, six pairs
Take the default list: Asha, Rahul, Priya, Vikram, Meera, and Arjun — six names, one per line. Press the button and the tool shows six pairs, one per giver, in the same order as the list. One possible result is Asha → Rahul, Rahul → Priya, Priya → Vikram, Vikram → Meera, Meera → Arjun, and Arjun → Asha — a clean rotation, where everyone gives to the next person and the last gives to the first.
Press the button again and the pairs change, because the shuffle runs fresh each time. The counter above the output shows 6 participants and the status Everyone gives to someone else. The pairs are different, but the rule never changes: no one gives to themselves, and everyone gives exactly once and receives exactly once.
Try two names: Asha and Rahul. The only derangement is Asha → Rahul and Rahul → Asha, and the tool shows it every time — there is nothing else it can do with two people, which is why two is the minimum and not a good game. Try one name and the tool refuses: Add at least 2 names, because a Secret Santa with one person is just buying yourself a gift.
Who uses a Secret Santa generator, and why
Offices are the biggest users. A team of ten or twenty needs pairs, and the organiser needs them fairly and secretly. A hat draw in an office means slips of paper, someone's handwriting, and the risk of a redraw in front of everyone. The generator does it in one press, and the organiser can share each pair privately — by message, not by announcement.
Families are the second group. A family spread across cities cannot draw names from a hat together, but they can all send their names to one person, who runs the generator and messages each pair. The pairs are the same as a hat draw, without anyone needing to be in the same room.
Friend groups and classrooms are the third group. A group of friends needs a fair draw with no favouritism, and a classroom needs one where the teacher can check that nobody drew themselves. The tool does not store anything, so a group's names stay in that group. For a random name rather than a pairing, use a name list of your own — this tool pairs names, it does not pick them.
Secret Santa generator vs drawing names from a hat
A hat draw is better when the moment matters: the slips of paper, the reaching in, the suspense — a ritual that is part of the fun. If everyone is in the same room and the draw is an event, use the hat. The generator cannot replace the theatre of it.
The generator wins when the group is remote, or when secrecy matters. A hat draw in an office means someone sees the slips, and a redraw is public. The generator's pairs are private by default: the organiser sees them all, and each person sees only their own. It also wins on the self-draw rule — the hat can fail it, and the generator cannot.
The practical rule is simple. Use this tool when the group is spread out, or when the draw has to be secret and fair without an audience. Use a hat when everyone is together and the draw is part of the party. Both give every giver a different receiver; the difference is the room, not the maths. A random number generator can assign numbers to names the same way, if the group prefers numbers to names.
Common Secret Santa mistakes
The most common mistake is sharing the whole list. The pairs are secret: each person should know only who they give to, not the whole chain. If the organiser posts the full list in a group chat, the game is over before it starts. Share each pair privately, one message per person.
Second: forgetting the budget. A gift exchange without an agreed budget ends with one person spending ten times what another spent, and someone feeling bad. Agree the amount before you draw, and make it small enough that everyone can join. The generator handles the pairing; the group handles the money.
Third: drawing twice and using the second draw because you liked it better. The draw is the draw — re-rolling until you get a giver you prefer is cheating, and it breaks the fairness the generator guarantees. Press the button once, share the pairs, and play the game. And the fourth mistake is including someone who cannot take part: if a person cannot buy a gift, they should not be in the list, because the pairing assumes everyone both gives and receives.
How to use this Secret Santa generator
Paste the names into the box, one per line — the default list has six names to show the format. Duplicate names are removed, and blank lines are ignored, so a messy paste still works. Press Generate Pairs, and the pairs appear in the output box below, one per line, with the count and the status shown above them.
To draw again, press the button again — every press shuffles a fresh derangement. To use the pairs, copy them with the copy button, or select them by hand — but share each pair privately, not in a group chat, or the secret is gone. One message per person, with only their receiver's name in it.
Everything runs in your browser. No sign-up, no account, no data sent anywhere — the names never leave your device, and the page works offline once it has loaded. The pairs are shown on screen only, so the organiser is the only person who sees them all — which is exactly how Secret Santa should work.