Anticode Open builder

Build a Secret Santa generator that draws fairly and reveals matches privately

Drawing names from a hat breaks down when couples can't draw each other, someone draws themselves, or last year's pairs repeat. A Secret Santa generator fixes that with rules. Anticode can build one that runs entirely on one phone or laptop, then reveals each match privately as people take turns. It can't email anyone their match, and that shapes the design.

Updated · By the Anticode team

The rules a draw has to follow

  • Nobody draws themselves. Obvious, but a naive shuffle gets it wrong often.
  • Exclusions. Partners, housemates, a parent and child, or anyone who drew each other last year.
  • One gift each. Every person gives exactly one and receives exactly one.
  • No small loops, optionally. Some groups prefer one big chain (A gives to B, B to C, all the way back to A) so no two people simply swap.

A draw that never gets stuck

The hat method has a known failure: the last person left draws their own name, or the only names left are excluded, and everyone starts again. A computer draw can avoid this. Ask the model to shuffle, check every rule, and retry until a valid assignment is found, or to search for one directly. With heavy exclusions in a small group, there may be no valid draw at all; the app should say so plainly ("With these exclusions, Sam has nobody left to draw. Remove one exclusion.") rather than looping forever.

Ask for the result to be fixed once drawn. Redrawing because someone dislikes their match quietly ruins the secret for others.

Revealing matches on one device

An Anticode app has no network, so it can't send each person an email or a message with their match. Anything typed into the app stays in that browser. The reveal therefore has to be private on a shared screen, which works well in a room or on a video call where the organiser shares nothing:

  1. The organiser enters names and exclusions, then runs the draw. The app shows only "Draw complete", never the list.
  2. The phone is passed round. Each person taps their own name and holds a button (or types a short code they chose) to see who they're buying for.
  3. On release, the match hides again and their name is marked as seen, so nobody can peek twice by accident.
  4. An organiser reset, behind a confirmation, reveals the full list only if something goes wrong.

For a group that isn't together, the organiser can read each person their match privately, which means the organiser isn't part of the secret. If that matters, the organiser shouldn't also take part, or use a service that emails matches.

Budget, wishlists and the day

Small extras make the app useful beyond the draw: the spending limit and exchange date on the start screen, an optional gift hint per person ("loves gardening, no candles") shown alongside the match, and a countdown to the exchange. Keep these in the same device's storage; a page reload shouldn't lose the draw.

Describing it to Anticode

"A Secret Santa generator for nine people at our family Christmas. Add names, mark couples and last year's pairs as exclusions. Draw once, valid every time, one chain so no swaps, and a clear message if the rules make it impossible. Pass-the-phone reveal: tap your name, press and hold to see your match and their gift hint, release to hide. Show the budget and date at the top. Festive but grown-up: deep green and warm gold, no cartoon elves."

Anticode's model builds it as one app. Run a test draw with made-up names first and try the edge cases: an exclusion set that's impossible, a reload halfway through the reveals, someone tapping a name that's already been seen.

Where this falls short

  • No emails or messages. People must see their match on the device that ran the draw.
  • No remote sign-ups. Participants can't add themselves or their wishlists from their own phones; the organiser enters everything.
  • One device only. The draw is saved in that browser. Opening the published link on another phone shows an empty app.
  • No anonymous chat between giver and receiver; that needs a server.

If your group is spread out and nobody wants to be the organiser who knows everything, a dedicated service that emails matches is honestly the better tool. For other one-screen party tools, see the random name picker and the digital advent calendar.

Questions people ask

Can the Secret Santa generator send emails?

No. It runs in a sandbox with no network. Matches are revealed privately on the same device.

What if someone forgets their match?

Ask for a way to re-show one person's match after a code they chose, rather than the organiser revealing the full list.

Does the organiser see everyone's match?

Only if you build an organiser view. Leave it out, or put it behind a confirmation, if the organiser is taking part.