Aleatorizador de listas
Baraja una lista, elige N al azar, o saca un único ganador - con el CSPRNG del navegador.
Pega una lista, elige un modo: mezclar, elegir N, o sacar un ganador. Fuente aleatoria: crypto.getRandomValues, el CSPRNG del navegador.
Cómo usarla
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.
¿Qué es?
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.
Cuándo usarla
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.
Errores comunes
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.
Preguntas frecuentes
- 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).