Sorteador de listas
Embaralhe uma lista, escolha N ao acaso, ou tire um vencedor - via CSPRNG do navegador.
Cole uma lista, escolha um modo: embaralhar, escolher N, ou tirar um vencedor. Fonte aleatória: crypto.getRandomValues, o CSPRNG do navegador.
Como usar
Paste your list
One entry per line. Empty lines are ignored.
Pick a mode
Shuffle, pick N, or pick winner.
Run the draw
Click Shuffle / Pick. The output is the new order or selection.
O que é?
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.
Quando usar
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.
Erros comuns
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).