Secret Santa Generator
Assign Secret Santa pairs with exclusions and no self matches using crypto randomness.
Names and assignments stay in your browser. Nothing is uploaded.
Participants
One name per line. At least two people are needed, and each name can appear once.
Exclusions (optional)
Write two names separated by a dash, one pair per line: Ani-Budi. Those two people are never paired, in either direction.
Who gives to whom
Read each line as: the first person gives a gift to the second person.
The draw happens in this tab. Names are not stored, uploaded, or shared.
How the draw avoids awkward pairings
A valid assignment is a derangement: every participant gives exactly one gift, every participant receives exactly one, and nobody is matched with themselves. The generator shuffles the list with crypto.getRandomValues, then checks the result against the rules. A shuffle that breaks a rule is thrown away and a fresh one is drawn, which keeps every valid arrangement equally likely instead of patching a bad result by hand.
Why exclusions can fail
Exclusions shrink the set of valid assignments. With two people and one exclusion there is no valid draw at all, because the only possible pairing is between those two. The generator retries a bounded number of times and then reports that the rules cannot be satisfied, rather than returning a broken result.
Keeping the result secret
The list is shown on one screen, so the page is meant to be passed around or copied one line at a time. Nothing is written to storage, so closing the tab removes the assignment. Use the copy button to send each person only their own line.
Frequently asked questions
What happens if a name appears twice?
The draw stops and names the duplicate. Two identical entries would create two people with the same label, and the result would be impossible to read.
Can someone draw themselves?
No. Self-matches are rejected before any list is shown, together with every excluded pair.
Is the result repeatable?
Each run draws new randomness from the browser, so the same list produces a different assignment every time. Nothing is seeded or saved.