Closed-loop draw with exclusion pairs and one-at-a-time reveals.
6 participants · 2 exclusion pairs
Couples or teammates who must not draw each other, e.g. Alice - Bob. Separators: ->, &, comma, or a hyphen with spaces on both sides — hyphenated names like Mary-Jane keep working.
🎅 A closed-loop draw: everyone gives once and receives once, nobody draws themselves, and exclusion pairs (couples, teammates) never land on each other. Pairing is found with crypto-shuffled backtracking — it either returns a valid draw or tells you the rules are impossible. Results never leave this page.
The Secret Santa Generator is based on the following formula:
assign: bijection [0..n−1] → [0..n−1] with assign(i) ≠ i and assign(i) ∉ banned(i) !n = n! × Σ(k=0..n) (−1)^k / k! (valid draws without exclusions)
Variables: n = Number of participants assign(i) = The person participant i gives to banned(i) = Exclusion set of participant i (mutual) !n = Derangement count
A valid Secret Santa is a derangement — a permutation with no fixed points — further restricted by mutual exclusion pairs. The tool shuffles each giver's candidate receivers with crypto randomness and backtracks, so it finds a valid loop whenever one exists and reports impossibility otherwise.
Worked example: Step 1: n = 4, no exclusions: total permutations 4! = 24. Step 2: Derangements !4 = 24 × (1 − 1 + 1/2 − 1/6 + 1/24) = 9 valid loops. Step 3: Alice→Bob→Carla→Dev→Alice is one of them: nobody maps to themselves, loop closed. Step 4: Ban the pair Alice-Bob: only the double swap Alice↔Bob, Carla↔Dev contains that pairing, so 8 of the 9 loops survive. Result: the generator returns one of the remaining valid loops at random.
A Secret Santa draw is a derangement: a closed loop where everyone gives exactly one gift and receives exactly one, and nobody draws their own name. For four participants only 9 of the 24 possible permutations qualify; for a large group roughly 1 in e (about 36.8%) of all permutations works. This generator searches with crypto-shuffled backtracking, so it either finds a valid pairing or tells you the rules are impossible — it never quietly bends one.
Couples who shouldn't draw each other, teammates from last year's exchange, siblings — each pair you ban shrinks the solution space. Ban too many and no valid loop exists (the classic failure: three people with every pair excluded). That is a math fact, not a bug, and the tool reports it so you can loosen one rule instead of wondering why it keeps spinning.
Pass one device around: each person picks their own name from the list, sees only their recipient, and copies the message to their notes. Nobody's match is displayed by default and the organizer never has to see anyone's pairing — which is the whole point, since an organizer who knows everything can still play favorites subconsciously.
Fix the budget before drawing (a range like $20-30 beats a single number for wish lists), set a deadline, and decide whether gag gifts are allowed. For remote groups, draw on a video call and let each person open the page on their own device — the results live in your browser only, nothing is sent anywhere.
More tools you might find useful
Keyword plus four styles, filtered to any platform length limit.
Spin to decide: names, chores, restaurants — fairly chosen.
A crisp instant heads-or-tails with a running tally.
Roll any dice — d4 to d100, multiples at once, fair rolls.