Secret Santa Generator
A free Secret Santa name draw with exclusions, a budget and a date. Send private reveal links, pass the phone or print slips. No emails, no accounts.
Add 3 to 100 first names, one per line. No emails needed.
Rules and details (optional)
Who shouldn't buy for whom?
For couples, housemates or last year's match. Tick “both ways” to stop them drawing each other at all.
Private links are stored only until 30 days after your exchange date (60 days without one). No emails, no accounts.
- Verified: fair odds and exact landing tested on every release
- Last reviewed:
- No accounts or emails: pass-the-phone and printable slips store nothing, and private links keep only first names, wishlists and the draw
- Found an error?
How the Secret Santa generator works
- Step 1
Add the names
Type or paste 3 to 100 first names, one per line. Add rules if some people should not draw each other, such as couples, and an optional budget, date and note.
- Step 2
Draw
Choose how people will see their match: private links (the default), pass-the-phone on one device, or printable slips. The draw follows every rule you set.
- Step 3
Unwrap
Each person opens their own link, unwraps their match and can add a wishlist that only the person buying for them will see. No emails, no accounts.
Ideas for the office, family, classrooms and long-distance friends
Office and team
- Set a budget and a date, then send each person a private link in chat.
- Add exclusions so people on the same project, or managers and direct reports, don't draw each other.
- Turn on one big loop so nobody just swaps gifts with one other person.
Family and friends
- Add both-ways exclusions for couples and for last year's match.
- Ask everyone to add a wishlist on their link, so the giver can choose with confidence.
- Use pass-the-phone at the dinner table: nothing is stored and nobody sees anyone else's match.
Classrooms
- Use printable slips: print, cut, fold and hand them out face down.
- Set a small budget in the note and a gift-exchange date.
- Draw in front of the class, then close the page: slips mode stores nothing.
Long distance
- Private links work across time zones: send them in a group chat or by text.
- Set the exchange date so gifts have time to ship.
- Check the organizer page to see who has opened their link and who still needs a nudge.
More ways to pick: the spinning wheel, the random number generator, and the Christmas countdown.
How the draw works
Names are shuffled with a cryptographic random number generator, and a shuffle is kept only if it follows your rules. Nobody draws themselves, no excluded pair is matched and, if you ask for one big loop, everyone is in a single chain.
Formulas
Random numbers come from crypto.getRandomValues: your browser's generator for pass-the-phone and printable slips, and the server's cryptographically secure generator for private links. Math.random is never used for a draw.
The draw is a uniformly random permutation made with a Fisher-Yates shuffle, using unbiased integers (rejection sampling, so rounding never favors some outcomes). Person i buys for person π(i).
P(each permutation) = 1 ÷ n!
A shuffle is accepted only if nobody is matched with themselves and no excluded pair is matched. Because a uniform draw is filtered, every valid assignment is exactly equally likely.
P(valid assignment) = 1 ÷ (number of valid assignments)
For one big loop the shuffle is Sattolo's algorithm, which produces a uniformly random permutation that is a single cycle, then the same filter is applied. Without that option, small groups can end up swapping gifts in pairs.
Before drawing, the page checks that a valid draw exists using a bipartite matching of givers to receivers (Hall's condition). If it does not, it names the people involved, for example three people who can only buy for two. For one big loop it also checks that the rules do not split the group.
If the rules are so tight that 20,000 shuffles fail, a randomized depth-first search finds a valid draw instead. That draw is always valid but not exactly equally likely among all valid draws.
Private links: the draw runs on the server and the organizer receives links, never matches (unless they switch organizer can't peek off). Each link returns only its owner's match and that person's giftee's wishlist. Links hold 128 random bits.
Sources
- Wilson, Random and exhaustive generation of permutations and cycles (Annals of Combinatorics, 2009). Treats the standard method for generating a random permutation together with Sattolo's algorithm, which generates a uniformly random cyclic permutation, the single loop used when one big loop is chosen.
- Duke University, COMPSCI 230 lecture notes: matchings. States Hall's Marriage Theorem: a bipartite graph has a perfect matching of one side exactly when every subset of that side has at least as many neighbors as members. The page uses it to find and explain impossible rules.
- MDN Web Docs, Crypto.getRandomValues(). The cryptographically secure random number API behind every draw.
How we test this
This tool is tested for fair odds, exact landing and reproducible draws every time the site is released, and a release does not ship if a check fails. Example from the test suite: Ana, Ben, Chloé, Dev and Esi, with Ana and Ben not buying for each other, from the fixed seed 5ec2e75a…c0de gives Ana → Chloé, Ben → Dev, Chloé → Ana, Dev → Esi, Esi → Ben. The test checks that this assignment is one of the valid ones found by brute force over every permutation. Separate tests draw 100,000 times and check the counts against equal probabilities with a chi-square test, and check 100,000 draws for self-matches, exclusions and single loops, agreement with brute force on 300 random rule sets, and that each private link returns only its owner's match.
The test is “secret santa: a seeded example draw is valid, follows the exclusions and never changes” in tests/santa.test.mjs. More on how all tools are tested: our testing approach.
Assumptions and limits
- The randomness is only as good as the device's or the server's generator.
- Anyone holding a private link can open that person's match, including the organizer. The organizer page never shows matches with organizer can't peek on, and each person sees when their link was first opened, but this cannot stop someone opening a link they were given.
- Private links store the event title, budget, date, note, first names, wishlists and the draw, with no emails, phone numbers or IP addresses. They are deleted 30 days after the exchange date, or 60 days after creation without one.
- Names must be different (add an initial for two people with the same name). A draw holds 3 to 100 people.
- Draws are not editable: to add or remove someone, delete the draw and start again.
Last reviewed , the date of the latest change to this tool's calculation or content.
Helpful answers
Frequently asked questions
- Is this Secret Santa generator free?
- Yes. It is free, has no ads in the tool and needs no sign-up. You can draw for 3 to 100 people.
- Do people need an email address or an account?
- No. We never ask for emails, phone numbers or accounts. With private links, you send each person their own link yourself, in any chat or message app you already use.
- How do I stop couples from drawing each other?
- Open Rules and details, choose two people and tick both ways. You can also add one-way rules, for example to stop someone buying for last year's match. If your rules make a draw impossible, the page tells you which people are the problem.
- Can the organizer see who is buying for whom?
- Not with the default setting. With private links and organizer can't peek on, the draw runs on the server, the organizer gets links but never the matches, and the organizer page lists only names and who has opened their link. One honest limit: whoever holds a link can open it, so the organizer could open someone's link and see that person's match. Each person is shown when their link was first opened, so a peek is visible to them. Pass-the-phone and printable slips are drawn in your browser and nothing is stored.
- How do people see their match?
- With private links, each person opens their own link, unwraps a gift and sees who they are buying for, plus the budget, date and note. With pass-the-phone, each person taps their name and holds a button to see their match. With printable slips, you print and fold a slip for everyone.
- What happens to the data?
- Pass-the-phone and printable slips store nothing. Private links store the event settings, the first names you typed, wishlists and who buys for whom, under unguessable links, with no emails, phone numbers or IP addresses. The draw is deleted automatically 30 days after the exchange date, or 60 days after it was made if there is no date, and the organizer can delete it right away.
- Is the draw fair?
- Yes. The names are shuffled with your device's or the server's cryptographic random number generator, and a shuffle is kept only if it satisfies your rules, so every valid assignment is equally likely. In the rare case where rules are so tight that almost no shuffle qualifies, a randomized search finds a valid draw instead; that one is always valid but not exactly equally likely.
- What if someone drops out or joins late?
- Start over with the new list. Private links from the earlier draw stay valid until you delete it from the organizer page, so delete it first to avoid confusion.
Related Tools
Spin the Wheel
newA fair, free wheel spinner and random name picker. Weighted odds, verifiable draws, saved wheels, and nothing uploaded unless you share.
Christmas Countdown
newA live countdown to Christmas in your time zone, with days, sleeps, weekdays, fullscreen classroom mode and a free embed.
Random Number Generator
Generate random numbers in any range. Supports multiple results, dice, and coin flip.