UTILS.
100% in-browser
🎅

Secret Santa Generator

Randomly assign Secret Santa gift pairs so everyone gives and receives once, with optional exclusion pairs. Runs entirely offline in your browser.

Single-device organizer tool — it reveals the full list, so run it privately.
— output appears here —

About this tool

The Secret Santa Generator randomly pairs a group for a gift exchange so that everyone gives exactly one gift and receives exactly one — and no one draws their own name. Paste one name per line, add any exclusion pairs you need (for example, so a couple isn't matched to each other), and click Assign.

Under the hood it builds a valid derangement using a cyclic assignment: the names are shuffled with a Fisher-Yates shuffle driven by the browser's cryptographic random generator (crypto.getRandomValues), then each person in the shuffled order gives to the next person around the cycle, with the last giving to the first. A single cycle guarantees no self-matches and that everyone both gives and receives once. To honor exclusions, the tool reshuffles up to a couple of thousand times until it finds an arrangement that breaks no rule; if your constraints can't be satisfied, it tells you rather than returning a bad list.

This is a single-device tool for the organizer — it shows the full giver-to-receiver list on screen, so run it privately. Everything happens locally in your browser: nothing is uploaded and it works offline. Enter exclusions as two names per line separated by a comma, colon, or dash (for example, "Alex, Jordan").

Frequently asked questions

Can someone be assigned to give a gift to themselves?
Never. The assignment is a single cyclic derangement, which mathematically guarantees no person is matched to themselves and that everyone gives once and receives once.
How do I stop a couple from being matched?
Add an exclusion line with both names separated by a comma, colon, or dash, e.g. "Alex, Jordan". Exclusions are two-way, so neither person can draw the other. Add as many exclusion lines as you need.
What if my exclusions can't be satisfied?
The tool reshuffles up to a couple of thousand times looking for a valid arrangement. If no assignment can respect every exclusion (for example, too many overlapping rules), it reports that the constraints are impossible instead of returning an invalid list.
Is the draw private, and does it work offline?
This is an organizer tool that shows the whole list on one screen, so run it where players can't see. It runs entirely in your browser with the local crypto random generator — nothing is uploaded and it works offline.

More tools