Secret Santa generator

Enter the participants and the tool gives you a list of who gives to whom. Every assignment where no one gives to themselves is equally likely.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter participants (one per line) and draw number.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The list is shuffled and reshuffled until no one lands on themselves, giving a uniform derangement. Possible draws D(n) = (n - 1) × (D(n - 1) + D(n - 2)) with D(1) = 0 and D(2) = 1, and one person gets a given other person with chance 1 / (n - 1).

Example

Inputs: Draw number = 1. Result: Who gives to whom: ; Participants: 5; Possible valid draws: 44.

Limits and caveats

  • The full list shows on screen, so one organiser should read it and tell each person privately.
  • Exclusions, such as keeping couples apart, are not supported.

Questions about this tool

Can someone draw their own name?

No. The tool reshuffles until nobody lands on themselves.

Why at least 3 people?

With two people each would know who is giving to them, so there is no secret.

How many draws are possible for five people?

44 draws where no one gives to themselves, out of 120 orders.