How to use the Secret Santa generator tool
- Type or paste the participants under Names, one per line. You need at least two, and every name must be different.
- Select Draw names, or select Example to run a draw for four sample people.
- Read the Result box. Each line shows a giver, an arrow and the person who receives that gift.
- Select Copy to copy the full list of pairs, then tell each giver their recipient privately.
- Select Draw names again if you want a different arrangement. Every run reshuffles from scratch.
How the Secret Santa generator pairs people
The tool first shuffles the names with the Fisher-Yates algorithm: it walks the list from the end to the start and swaps each position with a randomly chosen earlier position or with itself. Then it reads the shuffled list as a circle. The first person gives to the second, the second to the third, and the last person gives to the first.
A circle has two useful properties. Nobody can be matched with themselves, and the chain never breaks into separate small groups. With more than two people it also rules out direct swaps, where two people simply buy for each other.
Random numbers come from the browser's cryptographic generator, crypto.getRandomValues, not from Math.random. The code discards raw values that would make some positions slightly more likely than others, a technique called rejection sampling, so every ordering of the list is equally probable.
Example draw with four names
One run with the example names Alex, Emi, Sam and Taylor produced the result below. Follow the arrows and you return to the start after four gifts: Alex, Sam, Emi, Taylor, Alex. Your own run will probably differ, since four people can be arranged in six different gift circles.
Alex → Sam
Sam → Emi
Emi → Taylor
Taylor → AlexRules, limits and what the draw does not do
The input check is short, and the tool does one job. Keep these points in mind when you set up an exchange.
- Fewer than two names, or any repeated name, stops the draw with: Enter at least two distinct names.
- Names are compared exactly after spaces at both ends are trimmed. Sam and sam count as two people, so check capitalization.
- With exactly two names the only possible result is that they give to each other.
- There are no exclusion rules, for example to stop partners from drawing each other.
- Nothing is emailed or saved. The pairs exist only in the Result box until you copy them or change the input.
Keeping the draw secret
The result lists every pair in one place, so whoever runs the draw sees all of it. If the organizer is also taking part, the surprise is gone for that person. The usual fix is to ask someone outside the exchange to run the draw and pass on each assignment in a private message.
Share each line only with its giver. If you redraw after some people have been told, tell everyone again, because a new run replaces the whole loop.
Frequently asked questions
Can someone draw their own name?
No. The pairs are read off a shuffled circle in which each person gives to the next one along. The next person is always someone else, so self-matches are impossible for any group of two or more.
Is the Secret Santa draw really random?
Yes. The shuffle uses the browser's cryptographically secure random source with a correction for modulo bias, which makes every ordering of the names equally likely. Each click of Draw names is independent of the previous one.
Can I prevent couples or family members from drawing each other?
The tool has no exclusion setting. It always produces one loop through all names. If a pairing is unwanted, run the draw again; with a small group and several exclusions you may need a few attempts.
Does the generator send the results to participants?
No. It does not collect email addresses or phone numbers and sends nothing. The organizer copies the list from the Result box and informs each giver through whatever private channel the group uses.
Are the names I enter stored anywhere?
No. The shuffle runs in your browser and the page keeps no record of it. Editing the name box or selecting Clear removes the current result from the screen.