Secret Santa Generator
Type the names, one per line, add any people who should not draw each other (a couple, a household) and press Draw: everyone gets exactly one person to buy for, nobody gets themselves and no excluded pair is ever matched. The example draws 6 people with 2 exclusion groups: Ava buys for Elena, Ben buys for Dev, Chloe buys for Femi, Dev buys for Ava, Elena buys for Chloe, Femi buys for Ben. Keep it secret by passing the phone so each person taps to see their own match, or copy a private link for each person. Nothing is uploaded, no emails are sent and there is no sign-up.
Updated By ponderloop editorial · How we checkRuns in your browser: nothing you enter is uploadedHow this tool works
Your Secret Santa match
This link holds one person’s match in the part after the # sign, which is never sent to a server.
Your draw
6 people drawn, 2 exclusion groups respected. Nobody drew themselves.
Budget: $25 · Exchange date: Dec 20
The names or settings changed: press Draw names to update.
Show all matches (organizer)
- Ava gives to Elena
- Ben gives to Dev
- Chloe gives to Femi
- Dev gives to Ava
- Elena gives to Chloe
- Femi gives to Ben
Pass the phone
Each person taps to see only their own match, then hides it before the phone moves on.
Private links
Each link opens a page that reveals one person’s match. It is kept in the part after the # sign, so it is never sent to a server. The text is only scrambled, not encrypted: send each link to its owner only.
How many valid draws a group has
| People | All orders (n!) | Nobody draws themselves | Share of all orders |
|---|---|---|---|
| 3 | 6 | 2 | 33.3% |
| 4 | 24 | 9 | 37.5% |
| 5 | 120 | 44 | 36.7% |
| 6 | 720 | 265 | 36.8% |
| 7 | 5,040 | 1,854 | 36.8% |
| 8 | 40,320 | 14,833 | 36.8% |
| 10 | 3,628,800 | 1,334,961 | 36.8% |
| 12 | 479,001,600 | 176,214,841 | 36.8% |
How to write exclusions
| Line | Both directions on | Both directions off |
|---|---|---|
| Ava, Ben | 2 blocked draws | 1 blocked draw |
| Ava & Ben & Chloe | 6 blocked draws | 2 blocked draws |
| Ava / Ben | 2 blocked draws | 1 blocked draw |
| Ava - Ben | 2 blocked draws | 1 blocked draw |
| Ava and Ben | 2 blocked draws | 1 blocked draw |
What a private link contains
| Part | Example | What it does |
|---|---|---|
| prefix | s1. | Marks the format version. |
| salt and check | first 4 bytes | A 16-bit salt scrambles the rest; a 16-bit check catches a link that was cut off. |
| payload | 31 characters here | Giver, receiver, budget and date as scrambled text. Scrambled, not encrypted: see the FAQ. |
How to draw Secret Santa names online
- Add the names. One name per line, at least 3 and up to 100. A repeated name is counted once.
- Add exclusions (optional). Put people who should not draw each other on the same line, separated by a comma, an ampersand or a slash. Leave “Both directions” ticked for couples; untick it to stop only the first name on the line from drawing the others.
- Set a budget and a date (optional). They are shown with every match and included in the private links.
- Press Draw. If the exclusions make a draw impossible, a message names the people who run out of options so you can relax one of the exclusions.
- Share the matches. Pass the phone around, copy a private link for each person and send it yourself, or open the organizer list. Press Draw again for a new draw, and send new links.
Frequently asked questions
- Is the Secret Santa draw really random and fair?
- Yes. The names are shuffled with a Fisher–Yates shuffle driven by your browser’s cryptographic random number generator (crypto.getRandomValues), and a shuffle is accepted only if nobody has themselves and no excluded pair is matched. Every valid draw is then equally likely. With 6 people there are 265 draws where nobody gets themselves, before any exclusions.
- How do exclusions work for couples and households?
- Write each couple or household on one line, for example “Ava, Ben”. With “Both directions” ticked (the default) none of them can draw any other person on that line. If you untick it, only the first name on the line is blocked from drawing the others, which suits a one-way rule such as “last year’s match”. Exclusions are checked as hard rules, never as preferences.
- What does “impossible with these exclusions” mean?
- Every person needs a different person to give to. If some people between them have fewer allowed recipients than there are people, no draw can exist, and the message names those people and who is left. Two people who exclude each other cannot be drawn alone, and in a group of three, one excluded pair is already impossible. Remove or loosen one exclusion and draw again.
- Are the names or results sent anywhere?
- No. The draw runs in your browser, there is no server that receives names, and no emails are sent. Your list is not saved unless you tick “Remember this list on this device”, which keeps it in this browser only until you press Clear. If you allow analytics, the site learns that a button was pressed, never a name or a result.
- How secure are the private links?
- They are private from servers, not from a curious participant. The match sits in the part of the link after the # sign, which browsers do not send to any server, so this site never sees it. But the text is only scrambled with a fixed method, not encrypted, so anyone who knows the format, or reads this page’s code, can decode a link in seconds. Send each link only to its owner, and use the pass-the-phone mode when you do not trust everyone to leave it alone.
- Does an odd number of people matter?
- No. The draw is not made of pairs. Each person gives to one person and receives from one, so the group forms one loop or several, and any number from 3 up works. Two people drawing each other is possible when the group has loops of two; press Draw again if you want to avoid that. Groups of two are not offered, because both people would know their match.
- What if someone drops out after the draw?
- If nobody has opened a link yet, remove the name and draw again. If people already know their matches, open the organizer list: the person who was drawing for the one who dropped out can take over the dropout’s recipient, as long as that is not themselves or an excluded person. Otherwise redraw for everyone and send new links.
- Can I redraw, and how do I stop people peeking?
- Press Draw again for a completely new draw; links and cards from the earlier draw then no longer match, so send the new ones. The organizer list is hidden until you open it, and the pass-the-phone screen shows one match at a time behind a tap, then hides it again before the next person.
- How many names can it handle?
- Between 3 and 100 names. Names are treated as Unicode text, so right-to-left names such as Hebrew or Arabic read in the right direction.
How it works
Names are read one per line (or split at the commas of a single line), trimmed, with blank lines ignored and repeats counted once. Each exclusion line is split at commas, ampersands, slashes, plus signs, “ - ” or “ and ”, and each name is matched to the list ignoring case and extra spaces; a name that is not on the list is an error. A valid draw gives each giver one receiver with every receiver used once, no giver drawing themselves and no excluded pair. The tool first checks that one exists with Kuhn’s augmenting-path matching algorithm. If it does not, the failed search yields a Hall violator, a set of givers with fewer allowed recipients than members (Hall’s marriage theorem), and the message names them. Otherwise the list is shuffled with Fisher–Yates using unbiased random integers from crypto.getRandomValues, and the shuffle is accepted if it breaks no rule; accepted shuffles are uniform over all valid draws. After 300 rejected shuffles (very tight exclusions) the tool assigns givers one at a time, each choosing randomly among the recipients that still leave a valid draw possible; that always succeeds, but then the valid draws are not exactly equally likely. A private link is “s1.” plus the base64url of a 16-bit salt, a 16-bit check and the JSON of giver, receiver, budget and date, XOR-ed with a stream from the mulberry32 generator seeded by the salt. This hides the text from a glance and detects damage; it is not encryption. The static example uses a fixed seed so the page never changes between builds.
Sources
More free tools
- Random Team GeneratorPaste names, choose how many teams or people per team, and split them randomly and evenly. Reshuffle, copy the teams or share a link to the same split.
- Spin the WheelType your own entries, add weights like Pizza*2 and spin a random picker wheel. The winner is drawn fairly on your device, and the list never leaves it.
- Tally CounterOnline tally counter with big + and − buttons: several named counters, shortcuts, step and target, total, undo and CSV export. Saved in your browser.
- Random Number GeneratorPick a random number between any two numbers, draw several with or without repeats, flip a coin or roll dice. Fair, unbiased and drawn on your device.
- Random Name PickerPaste a list and pick a random winner, shuffle it or split it into teams. Every entry has the same chance, and your list never leaves your device.
- Dice RollerRoll d4 to d100 or any custom die with dice notation like 3d6+2, 4d6kh3 or 2d20kl1, and see the exact odds of every total. Fair and rolled on your device.
More: Random picks and gamesAll math & numbersAll toolsHome & DIY calculators