πŸͺ Lanren Toolkit

🎁 Secret Santa / Gift Exchange Generator

Enter your participant list, optionally set "exclusion pairs" (e.g. couples who shouldn't draw each other), and generate everyone's individual draw result in one click β€” with a private link for each person so no one sees the full pairing on one shared screen.

Ad・Leaderboard 728Γ—90
Each pair is excluded in both directions β€” meaning Alex won't draw Jamie, and Jamie won't draw Alex either.
Ad・Rectangle 336Γ—280

πŸ“– How to Use

  1. Paste everyone taking part in the gift exchange into "Participant List," one name or handle per line, at least 3 people.
  2. If some pairs can't draw each other (couples, partners, family members who'd rather not), add them to "Exclusion Pairs," one pair per line, comma-separated (e.g. "Alex,Jamie") β€” each pair is excluded in both directions.
  3. Click "🎁 Generate Gift Exchange Pairing" β€” the tool automatically produces a "who gives to whom" result, guaranteeing no one draws themselves and no one draws an excluded partner.
  4. Once generated, the page lists a private link for each person β€” send each link individually, in a private message, to that specific person (don't post the whole batch in a public group chat). Opening their link only shows that person their own result, not anyone else's.
  5. If needed, you can also expand "πŸ”’ Organizer only: show the full pairing table" to double-check the list yourself β€” this table is for the organizer's own reference only; don't screenshot or share it publicly.
Note: if your exclusion rules are too strict (e.g. a small group with a lot of exclusions), the tool may not be able to find a valid pairing and will prompt you to relax the rules or add more participants and try again. Also, make sure to send each link individually and privately β€” posting them all in a public group chat defeats the purpose of keeping things secret.

πŸ“– Deep Dive: Achieving "Privacy" Without a Backend Server

The pairing algorithm: guaranteeing no self-matches and no excluded pairs

A gift exchange pairing is mathematically a "derangement" β€” arranging everyone in an order where each person is assigned to give a gift to someone else, with the rule that no one can be assigned to themselves. This tool works by first shuffling the participant order with a Fisher-Yates shuffle to produce a candidate pairing, then checking whether that result breaks any rule (does anyone get assigned to themselves, does anyone match an excluded partner) β€” if it fails either check, the whole result is discarded and reshuffled, up to 5,000 attempts, until a fully valid pairing is found. This "generate randomly, then check" approach sounds simple, but as long as the exclusion rules aren't too restrictive, it typically finds a valid solution within a handful to a few dozen attempts, running fast enough that users won't notice any delay.

How to achieve "no one sees the full pairing" without a server

Achieving true privacy β€” where a link for person A only ever returns A's result from the server, and no other data even passes through A's device β€” technically requires a server that stores the pairing in a database and, after verifying each person's identity, returns only their own record. This tool is a purely static, front-end web page with no server capable of doing that, so it takes an honest middle-ground approach: it encodes the entire pairing result (everyone's full assignment) together with an "index number" into a URL parameter, generating a link for each person. When the page loads, it only displays the entry matching that index β€” the rest of the pairing data does technically travel to that person's browser through the URL, it's just never rendered on screen. This is the closest a purely front-end tool without a backend can get to real "privacy" β€” for the vast majority of people who won't bother decoding a URL, the experience is "I only see my own result," but this is not the same guarantee as genuine server-side access control.

The real limits of this privacy mechanism, and when not to use it

To be honest, this mechanism isn't encryption β€” it's just base64 turning a JSON object into a text string tucked into the URL. Anyone who understands the encoding and is willing to spend the time studying the URL could, in theory, reconstruct the entire pairing, including everyone else's results. For a casual exchange among friends, coworkers, or family, this limitation is usually harmless β€” most people never bother decoding a URL, and the tool itself reminds you to message links privately rather than posting them publicly. But if you're running a formal event with strict confidentiality requirements β€” say, involving high-value gifts or a real duty of confidentiality β€” you shouldn't rely on this link mechanism; use a formal drawing platform or app with account login and genuine server-side access control instead.

Worked example: 8-person gift exchange with two couples who shouldn't match

Say you're organizing an 8-person family gift exchange, and two couples (Alex & Jamie, Taylor & Sam) don't want to draw each other. Paste all 8 names into "Participant List," add "Alex,Jamie" and "Taylor,Sam" as two lines under "Exclusion Pairs," and click "Generate Gift Exchange Pairing" β€” the tool ensures the final result never has Alex drawing Jamie or vice versa, and the same for Taylor and Sam. Once generated, you'll get 8 individual links; send each one via message to the matching person only (e.g. Alex's link goes only to Alex). Opening it, they'll see only "Alex's gift recipient is: XXX" β€” not the other 7 people's results β€” achieving basic privacy for the exchange.

❓ FAQ

Does this tool really guarantee no one can see the full pairing table?

By design, whoever opens their own private link will normally only see their own result β€” but honestly, this isn't true server-side access control, because without a backend database, the full pairing data is actually encoded and traveling within the URL, it's just not displayed by the page's code. That's plenty private for everyday exchanges among friends, family, and coworkers, but it isn't cryptographic-grade security β€” always message links privately, one at a time, and don't share them publicly.

If I set too many exclusion rules, could it fail to produce a result?

Yes, that's possible. With a small group and very restrictive exclusions (e.g. 4 people with 3 mutually excluding pairs), a valid pairing might mathematically not exist at all. In that case, the tool will tell you it couldn't produce a valid pairing β€” reducing the number of exclusion rules, or adding more participants, will usually solve it.

Can I see the full pairing myself, to double-check it afterward?

Yes β€” after generating, there's a collapsible "πŸ”’ Organizer only: show the full pairing table" section you can expand to see everyone's assignment, handy for confirming there were no mistakes or that your exclusion rules actually took effect. This table is for your eyes only β€” don't screenshot or share it publicly, or you'll spoil the surprise for everyone.

What happens if there are duplicate names in the participant list?

The tool automatically removes duplicates, keeping just one copy, and shows a notice on screen warning you that duplicates were found. If two participants genuinely share the same name, add a distinguishing note after each (e.g. "Alex (Sales)," "Alex (Engineering)") so they aren't mistakenly merged into a single person and undercounted.

Is my participant list, exclusion rules, or the generated pairing stored or sent to a server?

No. The entire pairing algorithm, encoding, and decoding happen right in your browser using JavaScript β€” there's no code on this page that sends any data to a server. The links are copied and sent by you, through whatever channel you choose (a DM, a message); the tool itself never stores or sends anything on your behalf, and refreshing the page clears whatever is currently displayed.

Ad・Leaderboard 728Γ—90