In short: A Secret Santa generator gives each person one other person to buy a gift for. Everyone gives once and receives once, and nobody gets themselves. This one can keep chosen pairs apart and gives each person a private link, so the organiser does not need to read the matches.
How the Secret Santa matches are made
This is the online version of putting names in a hat: you draw names for the whole group at once, and each person finds out only their own.
- List everyone. Names are tidied and repeats are dropped, ignoring capital letters.
- Add your rules. Exclusions for couples, housemates or last year's match keep those pairs apart, in one or both directions.
- Match at random. The tool picks a random assignment where each person gives to one person and receives from one person, using only pairs the rules allow.
- Send private links. Each link opens a page that shows one person's match, and only after they press a button.
For example, with Ana, Ben and Cy there are only two possible matches: Ana gives to Ben, Ben to Cy and Cy to Ana, or the reverse. With four or more people there are many more, and each rule you add removes some of them. When the rules remove too many, the tool says so instead of giving a wrong result. If someone is left with nobody to give to or nobody to receive from, it names that person.
How many different Secret Santa draws are possible?
A fair draw is an arrangement in which nobody keeps their own name. Mathematicians call that a derangement. The number of them for each group size is listed as sequence A000166 in the On-Line Encyclopedia of Integer Sequences. The table counts them for the group sizes most exchanges have. They are counted from the same table of allowed pairs the generator builds from your rules. The table also shows how many of those draws form one circle through everyone.
| People | Possible draws | Draws that are one circle | Paper hat draws where someone pulls their own name |
|---|---|---|---|
| 3 | 2 | 2 | 66.7% |
| 4 | 9 | 6 | 62.5% |
| 5 | 44 | 24 | 63.3% |
| 6 | 265 | 120 | 63.2% |
| 7 | 1,854 | 720 | 63.2% |
| 8 | 14,833 | 5,040 | 63.2% |
| 9 | 133,496 | 40,320 | 63.2% |
| 10 | 1,334,961 | 362,880 | 63.2% |
| 12 | 176,214,841 | 39,916,800 | 63.2% |
The last column is why drawing slips from a hat so often fails. With 4 people, 62.5% of hat draws leave someone holding their own name, and from then on the share stays near 63%: 63.2% for 6 people and 63.2% for 10. It settles there because of a result the encyclopedia entry gives: the number of derangements is the number of all orderings divided by e, rounded.
So the share that fails is about 1 minus 1/e. The generator only ever builds draws from the allowed pairs, so nobody pulls their own name and nobody has to start again. It does not list the 1,334,961 possible draws for ten people. Instead it shuffles each person's allowed receivers with the browser's cryptographic random generator and builds one valid draw. If any valid draw exists, it finds one.
A worked example: a family of six with two couples
Ana, Ben, Cy, Dee, Eve and Finn draw names. With no rules there are 265 possible draws, 120 of them one circle. Keeping the first couple apart with the rule Ana & Ben leaves 168. Adding the second couple, Cy & Dee, leaves 116. And stopping Eve from giving to Finn again after last year, with Eve > Finn, leaves 96, of which 40 are one circle. Each rule takes out a share of the draws, but 96 is still plenty to choose from at random.
Small groups run out fast. Take four people who are two couples, with both couples kept apart. They have only 4 possible draws and 2 circles, and each person has only two people who could be buying for them. Three people with one couple kept apart have none. Both partners could only give to the third person, who can receive only one gift. So the tool says the rules leave no way to match everyone. If your group is small, use fewer rules or bring in more people.
Keeping the Secret Santa secret
A private link holds one giver, one receiver and the optional budget and date in the part of the address after the #. Browsers never send that part to a server, so the match reaches only the person you send the link to. The organiser's page lists names with copy buttons and never prints the matches. The links are still readable by anyone who has them. So send each one in a private message, and avoid posting them in a group chat. For a surprise even the organiser cannot spoil, paste each link into a message without opening it.
Sending the links by text message, WhatsApp or work chat
The generator never asks for email addresses or phone numbers, so it has nothing to send on its own: you send each link yourself, in whatever app the group already uses. After the draw, each name has a copy button. Press it and open a private chat with that person: a text message, WhatsApp, Slack, Microsoft Teams or an email you write yourself. Then paste the link and send it. Ten people take ten short messages.
When the person opens the link, it shows their name and a button to reveal who they are buying for. It also shows the budget and the date if you set them. It shows nothing about anyone else. Copy all links as a list gives you every name with its link in one block. That is handy for keeping in your own notes while you send. Never paste that list into a group chat, because each link shows its match to whoever opens it.
Budget, date and fair rules
Set a budget in the box so every link shows the same limit, and a date so everyone knows when the gifts are due. Keep the rules short: every rule you add shrinks the number of possible matches, and a few rules on a small group can make a match impossible. Choosing one circle through everyone also guarantees that nobody is matched back to the person they are buying for. That makes the giver harder to guess. For a timeline, rules to send with the links and advice for remote teams, read how to organise a Secret Santa at work.
Esta herramienta también está en español: amigo invisible, con los mismos enlaces privados.
Questions people ask
How does the Secret Santa generator match people?
Each person is given exactly one other person to buy for, and each person receives exactly one gift. The match is random, made in your browser with its cryptographic random number generator, and it follows your rules: nobody gets themselves and no ruled-out pair is matched. If a valid match exists, the tool finds one.
How many people do you need for a Secret Santa?
At least three, and the generator takes up to 60. With two, each person would know who has them. Three people have only 2 possible draws, both of them one circle, so it works but there is little mystery. Four have 9 and six have 265, which makes the giver much harder to guess.
What happens if someone draws their own name?
With this generator nobody can: every draw is built only from allowed pairs, and a person is never allowed to give to themselves. With paper slips in a hat it happens a lot. For a group of 6, 63.2% of hat draws leave at least one person with their own name, and the whole group has to draw again.
Can the organiser see who got whom?
Not unless they choose to. The page never lists the matches. It only gives you a copy button for each person's private link, so you can send the links without reading them. Be aware that a link contains the match in the part after the #. Anyone who opens or decodes a link can read it. The organiser who wants a real surprise should paste the links straight into messages and not open them.
How do I stop couples or family from getting each other?
Add a rule with an ampersand, such as Ana & Ben, and neither will be matched to the other. Use an arrow, such as Ana > Ben, to stop only Ana giving to Ben, which is handy for avoiding last year's match. Names must match the people list, ignoring capital letters.
What does the one circle option do?
It links everyone into a single loop, for example Ana gives to Ben, Ben to Cy, and Cy back to Ana. That guarantees no two people are matched to each other, so nobody can guess their giver by working out who they are buying for. Without it, pairs who swap gifts are possible. If your rules make one loop impossible, the tool says so.
Why does it say no match is possible?
Your rules have left someone with nobody to give to, or nobody to receive from. Or the rules together leave no way for everyone to be matched. Three people with several ruled-out pairs is the usual cause. The message names the person who is stuck. Remove or loosen a rule and try again.
What if someone loses their link or drops out?
Make the matches again and send new links to everyone, because a match only works as a whole group. Pressing the button again makes a different match, so tell everyone to use the new links and ignore the old ones.
Do I need email addresses or an account?
No. There is no signup and no email step. The tool makes the draw in your browser and gives you one private link per person, which you can send however you like: a direct message, a text, a chat at work, or an email you write yourself. That makes it work for groups that do not share email addresses, such as a class or a sports team.
Are the names I enter sent anywhere?
No. The matching runs in your browser and nothing is stored or uploaded. Each private link carries one giver, one receiver and, if you set them, the budget and date. All of it sits in the part after the # in the address, which browsers never send to a server.