Secret Santa Pairer

Assign secret gift-givers fairly and privately

Generate Secret Santa pairings from a list of names so no one draws themselves, with optional exclusion rules to keep couples or rivals apart. Reveal assignments privately one at a time for office and family gift exchanges. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Can someone be assigned to give a gift to themselves?

No. The algorithm always excludes self-assignments, so every participant is matched with someone else as their gift recipient.

Organise a fair, private gift exchange

Drawing names from a hat is fine until someone picks themselves or two partners get matched and ruin the surprise. This Secret Santa Pairer handles both: it guarantees no one is assigned to themselves and lets you add exclusion rules so specific pairings never happen. Reveal assignments privately, one name at a time, so the secret stays safe.

How it works

The tool reads your participant list, splitting on newlines and commas and removing duplicates and blanks. It then searches for a valid assignment using randomized backtracking: it repeatedly shuffles the recipient pool and greedily assigns each giver the first available recipient who is neither themselves nor blocked by an exclusion rule. Exclusions are parsed from lines in Giver:Receiver form, where that giver is forbidden from being matched with that receiver. If a shuffle leads to a dead end, the tool retries with a fresh shuffle up to several hundred times; if no valid assignment exists under your constraints, it tells you the rules are too tight rather than producing an invalid result.

Exclusion rules — how to write them

An exclusion entry looks like Alice:Bob, which means Alice will never be assigned to give a gift to Bob. You can add as many rules as you need, one per line. Common uses:

  • Couples — prevent spouses or partners from drawing each other so the exchange feels separate from what they might already plan together.
  • Previous year repeat — paste last year’s pairings in reverse so the same pair never repeat back-to-back.
  • Cross-team rule — in a large office you might require that everyone draws from a different department.

Keep the list short. With 8 participants you have only 5,040 valid permutations before exclusions; a long exclusion list on a small group can exhaust all of them.

Worked example

Say the participants are Alice, Bob, Carol, and Dave, and you want to block Alice→Bob and Carol→Dave (they are couples). Entering those two exclusion lines lets the tool find an assignment like Alice→Carol, Bob→Dave, Carol→Alice, Dave→Bob — everyone gives exactly once, no one gives to themselves, and neither couple draws the other.

Running the reveal session

The best way to keep the surprise intact is to gather everyone around one screen. Each person taps the Reveal button beside their own name, reads who they are gifting, and the card closes before the next person looks. No assignment list is ever visible at once. Because everything runs locally in the browser, there is no database, no email, and nothing the organiser could accidentally forward.

Tips for the organiser

  • Set a price band when you share the invite — £15–£20 is a common sweet spot for office pools.
  • Announce the gift date at the same time you run the draw, so the reveal is actionable immediately.
  • If someone is unavailable at the reveal session, use the single-name reveal for them and read it aloud only to that person in private.
  • Re-running the generator reshuffles completely, so you can regenerate until you are happy — just make sure nobody has already seen their assignment.