Skip to content
gohacks.dev
Tooling

List Randomizer

Shuffle a list, pick random winners or split people into random teams, using a fair Fisher-Yates shuffle and the browser's secure random generator.

Free · No sign-up · Your inputs stay in your browser

Input

Shuffle a list, pick winners or split into teams

Output

8 items

Press Go.

A Fisher-Yates shuffle driven by crypto.getRandomValues, so every ordering is equally likely. The popular array.sort(() => Math.random() - 0.5) is biased: some orderings come up far more often than others.

Runs in this browser. Nothing you paste is sent to a server.

The biased shuffle

The one-liner array.sort(() => Math.random() - 0.5) is everywhere and is not fair: sort algorithms make assumptions that a random comparator breaks, and some orderings come up much more often than others. Fisher-Yates swaps each position with a uniformly chosen earlier one and is unbiased by construction.

Uses

Picking a code reviewer or an on-call order, splitting a workshop into groups, choosing giveaway winners, sampling rows for a manual QA check. For a sample from a database table, ORDER BY RANDOM() LIMIT n works on small tables and gets slow on large ones.

Share

Frequently asked questions

Is the shuffle truly random?
It is as random as the browser's cryptographic generator, which is suitable for security keys. Every permutation of the list is equally likely.
How are groups balanced?
Items are dealt in turn after shuffling, so group sizes differ by at most one.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools