Skip to content

List Randomizer

Shuffle a list, pick N random items, or draw a single winner - using your browser's CSPRNG.

Runs in your browser

Paste a list - one entry per line - and pick a mode: shuffle the whole thing, pick N items at random (with or without replacement), or single out a winner. Random source is window.crypto.getRandomValues, the same CSPRNG that browsers use for cryptographic keys.

How to use it

  1. Paste your list

    One entry per line. Empty lines are ignored.

  2. Pick a mode

    Shuffle, pick N, or pick winner.

  3. Run the draw

    Click Shuffle / Pick. The output is the new order or selection.

What is it?

A list randomizer takes a sequence of strings and produces a permutation, a sample, or a single random pick. The interesting part isn't the algorithm (Fisher-Yates shuffle, k-out-of-n sampling) - it's the random source. Math.random is fine for a hobby raffle; for anything that has to be defensible, the CSPRNG behind window.crypto.getRandomValues is the right tool.

When to use it

Picking a winner from a giveaway. Shuffling a class roster for a presentation order. Sampling 10 lines from a 1000-line log for a manual QA pass. Randomising a playlist when your music app has 'shuffle' but won't reveal the order. Splitting a team into pairs.

Common mistakes

Using Math.random for a high-stakes draw - it's not unbiased enough, and on older Safari versions it had known weaknesses. Forgetting that picking from a list with duplicates and asking for 'unique' returns the unique set first; clarify whether 'unique' means by line content or by line position. And running the shuffle, then sorting the output for display, which defeats the point.

FAQ

How random is 'random' here?
Cryptographically secure. We use crypto.getRandomValues which is the browser's CSPRNG - the same one that backs TLS key generation. For raffles, prize draws and anything that has to be auditable, it's more than enough.
Pick N: with or without replacement?
Without replacement by default - each entry can be picked at most once. Toggle 'allow duplicates' to sample with replacement (useful for stress-testing or simulating dice).

More in this category