Under the hood
How Gift Stampede works
What happens when you press Start the Stampede, and the exact rules the optional steal tracker follows.
Gift Stampede is a static web page. Everything described here runs in your browser on your own device: there is no server-side game, no account, and no upload of your guest list. This page describes what the code actually does, step by step.
1. Building the guest list
You can add names one at a time or paste a list with one name per line. Each name is trimmed, repeated spaces are collapsed, and names are capped at 40 characters. Duplicates are removed without regard to capitalization, so "Sam" and "sam" count as one person. The tool needs at least 3 names and accepts up to 40. The Start the Stampede button stays disabled until the minimum is met.
2. The shuffle
When you press Start the Stampede, the list is shuffled with the Fisher–Yates algorithm. It walks the list from the last position to the first, and at each position swaps the current name with a randomly chosen name at or before it, using the browser's built-in random number generator. Done this way, every possible ordering is equally likely, so each person has the same chance at every spot. The shuffle happens once, before the animation starts. Pressing New stampede on the results screen runs a fresh shuffle of the same names.
3. The stampede animation
The herd is purely decoration. Between 10 and 16 cartoon elephants (depending on how many players you have) cross the screen on randomized paths, sizes, speeds, and delays, kicking up dust puffs, while a progress bar fills over about six seconds. Then the dust settles and the order appears. The elephants are not tied to players and nothing about their movement affects the order, which was already decided by the shuffle.
- Skip to order cuts the animation short and shows the same order immediately.
- If your device is set to reduce motion, the elephants are skipped entirely and the order appears after a brief pause.
4. The results screen
The pick order is shown as a numbered list. You can copy it to paste into a group chat, edit the names and draw again, or start a new stampede. If you checked Track steals during the swap during setup, you can open the optional steal tracker.
5. The steal tracker rules
The tracker is a host's scoreboard. It does not hide anything or decide for anyone; the host taps what each person did. It follows these rules:
- Turns follow the pick order. Pick 1 must open a gift, because nothing is open to steal yet. You type a short name for each opened gift (for example, "mystery mug").
- Open or steal. On later turns the current player can open a new gift (while wrapped gifts remain) or steal an opened gift that is unlocked and held by someone else.
- The victim goes next. After a steal, the person who lost the gift takes the next turn and may open a new gift or steal a different one. After an open, play moves to the earliest person in the order who does not yet have a gift.
- No immediate steal-back. The gift that was just taken from someone is blocked for them on their turn. The one exception: once every gift is open, if that blocked gift is the only unlocked gift they could take, the tracker allows it rather than leaving them with no legal move.
- Max steals before lock. You choose a limit from 1 to 9 (default 2). Each gift shows how many times it has been stolen; when the count reaches the limit, the gift is marked locked and can no longer be stolen.
- Undo and reset. Undo last action rolls back the most recent open, steal, or keep. Reset tracker clears all gifts and the log.
6. Last picker may steal
This setting is on by default. When every player is holding a gift, the turn goes to the last name in the pick order, who can either keep their gift (ending the swap) or steal an unlocked gift from someone else. A final steal is a swap: the last picker takes the gift, and the person they took it from receives the last picker's previous gift. The steal counts toward that gift's lock limit. If this setting is off, the swap ends as soon as everyone has a gift.
7. Steals keep going after last open
This option sits under Last picker may steal and can only be turned on when that setting is on; turning last-picker off also clears it. It is off by default.
- Off: the last picker's steal is one swap and the swap is over. The person they stole from does not get another turn.
- On: the final steal works like a normal steal. The person who lost the gift gets a turn and may steal a different unlocked gift (not the one just taken from them) or keep what they hold. This continues until someone keeps or no legal steal remains, at which point the swap ends.
8. Settings lock mid-swap
Max steals, Last picker may steal, and Steals keep going after last open can only be changed before the first gift is opened. Once a gift has been opened or stolen, the controls are disabled and a note says to restart the steal tracker to change settings. Pressing Reset tracker clears the swap and unlocks them. This keeps the rules from changing under players who already made choices.
9. What is saved, and where
To survive an accidental refresh mid-party, the page saves a draft of your names, the pick order, and the tracker state in your browser's session storage for this tab. Closing the tab or clearing site data for giftstampede.com removes it. Nothing is sent to a Gift Stampede server. See the Privacy page for hosting and advertising details.
New to the game itself? Start with White elephant rules explained or compare house rules in Yankee Swap variants.
Last updated October 10, 2026.