Secret Santa Generator
EverydayRandomly assign Secret Santa gift pairs from a list of names. No sign-up, no app — paste your names and get instant, fair assignments in seconds.
What is a Secret Santa?
A Secret Santa Generator automates the name-drawing step of a gift exchange — the moment when names go into a hat, get shuffled, and each participant pulls out the name of the person they will buy a gift for. The generator replaces the hat entirely: paste in the list of participant names, click Generate, and receive a complete, randomised set of assignments instantly.
The tool enforces two rules that a physical hat draw sometimes fails: every person gives exactly one gift, every person receives exactly one gift, and no one draws their own name. This last condition — called a derangement — is easy to forget when shuffling manually, especially in small groups. The generator guarantees it on every run.
Secret Santa exchanges are common in Indian workplaces during the office Christmas party or year-end celebration, in college hostel groups, in extended families during Diwali or Christmas gatherings, and in online friend groups that want to exchange gifts across cities. The generator works for any of these contexts — the names can be in any language or script as long as they appear one per line.
Once you have the assignments, share each person's line privately — via WhatsApp message, email, or a quick DM — so the draw stays secret. The organiser sees the full list while distributing it, but each participant only needs to know their own assignment.
For groups that want a fully blind draw where even the organiser does not know the pairings, each participant can open the tool, paste the same full list, and note only their own assignment. Since the draw is random each time, this only works if you agree on a single canonical draw in advance. The simplest approach remains the organiser distributing assignments individually.
Use the Team Generator if you need to split your group into balanced teams rather than one-to-one pairs. Use the Random Name Generator if you need a list of placeholder names to test the draw format before committing to real participant names.
How to use this Secret Santa calculator
- Enter participant names — type or paste one name per line into the Participants field. Names can include full names, nicknames, or any identifier the group uses — the tool treats each line as one participant.
- Remove any blank lines — the generator skips blank lines automatically, but cleaning up the list avoids confusion in the output.
- Click Generate — the tool shuffles the list and produces a deranged pairing instantly. The result appears as a list of
Giver → Recipientassignments. - Copy individual assignments — use the copy button next to each line or select and copy the text. Send each participant only their own line.
- Re-run if needed — if a participant drops out or is added at the last minute, update the names list and click Generate again to produce a fresh draw for the updated group.
- Distribute privately — share each person's assignment via a private message so the draw remains secret until the exchange event.
Formula & Methodology
The generator uses a Fisher-Yates (Knuth) shuffle with derangement rejection sampling: 1. Copy the input list into a working array. 2. Shuffle the array in-place: starting from the last element, swap each element with a randomly chosen element at or before its current position. This produces a uniformly random permutation. 3. Check the derangement condition: if any indexihasshuffled[i] === original[i], the shuffle is invalid (someone drew their own name). 4. If invalid, repeat the shuffle. Repeat until a valid derangement is found, up to 200 attempts. For any group of n ≥ 2 participants, the probability that a random permutation is a valid derangement is approximately1/e ≈ 36.8%. This means the average number of shuffle attempts needed ise ≈ 2.72, so the loop almost always terminates in 1–3 iterations. The 200-attempt limit is a safety ceiling that will never be reached in practice. Example with 4 participants: - Input: Alice, Bob, Charlie, Diana - After shuffle: Bob, Diana, Alice, Charlie - Derangement check: Bob ≠ Alice ✓, Diana ≠ Bob ✓, Alice ≠ Charlie ✓, Charlie ≠ Diana ✓ - Valid — output: Alice → Bob, Bob → Diana, Charlie → Alice, Diana → Charlie