Three ways to let chance decide, in one place: a ladder game where everyone traces a line down to whatever they land on, a wheel you spin, and a splitter that deals a list of names into teams. Every draw is numbered, and the number goes into the link — so you can send the result to the group and they see the same outcome on their own screen instead of taking your word for it.
It is drawn from a seeded generator rather than from the system's randomness, and that is deliberate. A seeded draw can be replayed from a link, which is what lets everyone else verify the result instead of trusting the person who ran it. The number is chosen unpredictably when the page opens, so nobody knows the outcome in advance; once it exists, the draw it produces is fixed and shareable.
They could press "new draw" until they liked what they saw, which is true of any physical draw too. What the link does is stop them changing the result after the fact — once the number is shared, the outcome it produces is the outcome everyone else sees. Agree the number before you reveal the names for a draw nobody can argue with.
Each name starts at the top of its own vertical line. Going down, every horizontal rung swaps you onto the neighbouring line. Because two rungs are never allowed to touch the same column on one row, the path is never ambiguous, and because the swaps are reversible, no two people can ever land on the same outcome. Everyone gets exactly one, which is what makes it better than drawing straws for assigning a list of tasks.
Forty. The wheel becomes unreadable long before that and the ladder gets crowded past a dozen or so, but the team splitter is comfortable with the full list.
Yes — it uses a Fisher-Yates shuffle, which is the one that gives every possible arrangement an equal chance. The naive approach of sorting by a random number does not, and it quietly favours certain orderings. After the shuffle the names are dealt out one at a time, which is what keeps the group sizes even.