By Mian Ali Khalid · Published · How we build and test tools
How to draw Secret Santa names
- Type or paste the names, one per line. Repeats are counted once. The group needs at least two people, and three or more if you want to forbid swaps.
- Optional: list people who should never be matched, one group per line with commas (couples, housemates, a family).
- Optional: list pairs to avoid as Giver > Receiver, for example last year's draw, so nobody gets the same person twice running.
- Fill in the budget, the gift day and a short message if you want them printed on the slips and shown on the links.
- Press Draw names. Nobody sees a result yet. Pick how each person finds out: the Show my match button on a shared screen, Copy link for a private message, or Print slips.
Draw again makes a fresh draw with the same rules. The organizer can open show all pairings to check the result or fix a problem, but the full list is collapsed by default, so an organizer who is also taking part can stay in the dark.
Secret Santa name picker: what the draw guarantees
- Every person gives exactly one gift and receives exactly one gift.
- Nobody draws their own name. Mathematically a draw like this is a derangement.
- Nobody is matched with a person in their group, and no avoided pair appears.
- With No swaps on, two people never draw each other. With One big ring on, the whole group forms one loop.
- If the rules cannot all be met, you get a plain message naming what to change instead of a broken draw.
Keeping couples and family apart
Put each couple on one line, such as Alex, Bea. Everyone on a line is blocked from drawing anyone else on that line, so a family of four
on one line cannot draw each other at all. Extra rules shrink the number of possible draws quickly, as the table shows for a group where people are
paired off 1-2, 3-4 and so on. The counts come from enumerating every possible arrangement.
| People | Possible draws (no self) | Also no swaps | Also no partner | No partner and no swaps |
|---|---|---|---|---|
| 4 | 9 | 6 | 4 | 2 |
| 5 | 44 | 24 | needs an even group | needs an even group |
| 6 | 265 | 160 | 80 | 48 |
| 7 | 1,854 | 1,140 | needs an even group | needs an even group |
| 8 | 14,833 | 8,988 | 4,752 | 2,652 |
Four people in two couples can only be drawn 4 ways (2 once swaps are banned), so very small groups with many rules leave little randomness. If the rules leave no valid draw at all, the tool says so and suggests which rule to relax.
Why this beats drawing names from a hat
If a group shuffles slips and hands them out, the chance that at least one person ends up with their own name is between 62 and 67 percent for any group of three or more (the share of random arrangements that are not derangements settles at 1 - 1/e, about 63.2 percent). The group then has to redraw, and the redraw is visible to everyone. The generator rejects such draws before anyone sees them, and it honours exclusions that a hat cannot.
| People | Random arrangements | With nobody drawing themselves |
|---|---|---|
| 3 | 6 | 2 |
| 4 | 24 | 9 |
| 5 | 120 | 44 |
| 6 | 720 | 265 |
| 7 | 5,040 | 1,854 |
| 8 | 40,320 | 14,833 |
| 9 | 362,880 | 133,496 |
| 10 | 3,628,800 | 1,334,961 |
Budget and gift day
The budget and gift day boxes do not change the draw. They are copied onto the printed slips and shown on each private link so that nobody has to look the figure up in a chat. Agree the limit with the group before you draw.
What this Secret Santa generator does not do
- It does not send email or text messages. You pass on links, slips or the screen yourself.
- It does not collect wish lists or manage a gift registry. Share a wish list in your own group chat.
- The draw is made once in your browser. If you close the page before sending the links, the draw is gone: draw again and re-send.
- A private link is a plain encoded address, not a locked file. Treat it like a private message.
- Groups are limited to 100 names. Very tight rules can make a draw impossible, or hit the search limit, and the tool then says so.
- The results sit in the page until you close it, so Pass the device protects against onlookers, not against someone who inspects the page source. Do not put a comma inside a name: commas separate names.
FAQ
How does Secret Santa work?
Everyone in the group is secretly given one other person to buy a gift for. The giver stays anonymous until the gift day, or is revealed afterwards, and the group usually agrees a spending limit first. This generator does the drawing so that nobody gets their own name.
How do I do Secret Santa without email?
Draw names here, then use Pass the device so each person reads their own match on one screen, or copy a private link per person and send it in any chat. You can also print slips and hand them out. No email addresses are collected and nothing is sent by this page.
Can I stop couples or family members drawing each other?
Yes. Type each couple or family on its own line in the box for people who should never be matched, for example "Alex, Bea". Everyone in a line is blocked from drawing everyone else in that line. If the rules leave nobody a valid match, the tool says who is stuck.
What happens if someone draws themselves?
It cannot happen here. A draw where anyone has their own name is never accepted. By contrast, when names are drawn from a hat one after another, the last person can be left holding their own name and the group has to start again.
What does "no swaps" mean?
With no swaps on, if Alex gives to Bea then Bea does not give to Alex. Swaps are legal in plain Secret Santa, but many groups dislike them. With two people the only possible draw is a swap, so the option needs at least three people.
What does "one big ring" do?
It joins everyone in a single loop: A gives to B, B to C, and so on until the last person gives back to A. That rules out swaps and small closed loops, and it means every person gives one gift and receives one gift.
Is the draw really random?
Names are shuffled with the random generator built into your browser (crypto.getRandomValues), using rejection sampling so no name is favoured. With few restrictions the result is uniform over all valid draws. With very tight rules the tool switches to a randomised search that almost always finds a valid draw when one exists and is no longer exactly uniform. For extremely tight rules it can give up at its search limit, and it tells you so.
What is a good Secret Santa budget?
There is no standard. Agree a figure before the draw so that gifts are comparable, and write it in the Budget box so it is printed on the slips and shown on the private links. Groups often choose a round amount that nobody finds a strain.
Can I run a virtual or remote Secret Santa?
Yes. Draw the names, copy the private links and send each person only their own link. Each link opens a page that shows that person their match, the budget and the gift day. Agree where gifts are posted or delivered outside this page.
Sources
- Secret Santa, Wikipedia: members of a group are randomly assigned a person to give a gift to; the giver may stay secret or be revealed at the end.
- Derangement, Wikipedia: permutations with no fixed point, the subfactorial values for 2 to 10 people, and the limit of 1/e.
- Crypto.getRandomValues(), MDN: the browser's cryptographically strong random source.
- URI fragment, MDN: the fragment is not sent to the server when a page is requested.