Secret Santa Generator — fair draw with exclusions

Enter names (one per line), optional 'cannot give to' exclusions, and draw. Reveal codes keep it secret until the day.

Quick answer: Paste names and draw a fair Secret Santa pairing where nobody gets themselves (a proper derangement), with exclusions like couples or last year's pair. Runs locally — names never leave your browser.

How to use

  1. Paste your group's names into the box, one name per line (at least three names are needed).
  2. To keep two people from drawing each other, add no: plus the name on the same line, for example 'Sara no:Omar'.
  3. Press the Draw pairs button to run the draw.
  4. Check the table it produces: each giver is matched to a receiver - never themselves and never an excluded person.
  5. If you see the no-valid-pairing message, relax or remove one exclusion and draw again.
  6. Share each person's assignment privately - copy their line into a message or send a cropped screenshot, since the full table is visible only on your screen.

About this tool

A fair draw is a derangement — a permutation with no fixed points — which naive 'pick a random name' gets wrong surprisingly often. This tool builds the pairing with retry-backtracking so exclusions (partners, repeat pairs) are respected, and gives each giver a private reveal code so the organizer doesn't have to DM everyone. Everything happens in your browser; share the results list, not your data.

Drawing names from a hat fails in predictable ways: someone draws themselves, a couple draws each other, and the remote cousin never gets a slip at all. This generator builds what mathematicians call a derangement, an assignment where nobody is paired with themselves, and it respects exclusions you type on the same line as a name using the no: prefix, so partners or last year's pairs never meet again. It needs at least three names, redraws until every rule holds, and tells you plainly when a legal pairing is impossible.

The organizer sees the full giver-to-receiver table on their screen; there are no individual reveal links, so share each person's assignment by copying their line into a private message or sending one cropped screenshot each. Two habits prevent trouble: write exclusions in both directions for mutual rules, since no: blocks only one pairing, and keep spelling consistent with the list. If the tool reports that no valid pairing exists, your exclusions have made a legal draw mathematically impossible; relax one and redraw. Nothing is stored, so each visit starts fresh and a redraw is always an option.

FAQ

How does the draw stay fair?
It builds a derangement: a shuffled assignment where nobody is paired with themselves, redrawn until every exclusion you typed is also respected, up to 200 attempts. Everyone gives exactly one gift and receives exactly one, which a hat draw cannot guarantee once exclusions exist.
How do exclusions work?
Type no: followed by a name on the same line as the giver, for example 'Ali no:Hina'. The match is case-insensitive. Each exclusion blocks one pairing only; it is not mutual unless you add the reverse line too, so write both directions for couples.
What if no valid pairing exists?
With too many overlapping exclusions - or a group of exactly three where two people exclude each other - a legal draw is mathematically impossible. The tool tells you so instead of quietly breaking a rule; remove or relax one exclusion and draw again.
How do I keep the assignments secret?
The pairing table appears on your screen only. Copy each giver's line and message it to them privately, or take one cropped screenshot per person. There are no shared links, so nobody can peek at anyone else's assignment through the tool itself.
Do you store the names I enter?
No. The draw runs entirely in your browser: names are not uploaded, saved, or logged anywhere, and closing the tab erases them. Do remember that assignments are personal once shared - message each person privately rather than posting the whole table in a group chat.
When does a proper Secret Santa pairing matter most?
Office exchanges where couples or manager-and-report pairs should not meet, extended families avoiding repeat pairings from last year, classrooms, and friend groups. Anywhere the rules are no self-gift and no partner-gift, a real derangement saves the awkward redraw.

Rate this tool

Your rating stays in this browser (local storage) — nothing is sent to any server.