Random List Shuffler
Fast, accurate and free online random sortowanie listy tool running directly in your browser.
-
1Enter data
Enter content, paste text or load a file from disk. -
2Click the button
The tool will immediately process your data in the browser. -
3Get the result
Copy the finished text or save the file to your device.
return "Result ready in 0.1s";
}
Rate this tool:
Related tools
Other tools you may find usefulRandom list sorting - shuffle the list of elements using the Fisher-Yates algorithm
Random shuffle of the list is useful in many situations: randomizing the order of teams, shuffling quiz questions, randomizing the playlist, randomizing who presents first. The tool uses the Fisher-Yates algorithm (Knuth shuffle) - statistically correct shuffling.
Fisher-Yates algorithm (Knuth shuffle)
Description: traverse the list from end to beginning, for each element and randomly select j ∈ [0,i], replace i with j. Complexity: O(n). Result: each permutation is equally probable (uniform distribution). Pseudocode: for i from n-1 down to 1: j = random(0, i); swap(array[i], array[j]). JavaScript: 4-line implementation.
Naive shuffling errors
Error: for each item: swap with random other item. Problem: it does not give an even distribution! Example with 3 elements: there should be 6 permutations with equal probability. Naive algorithm: some permutations appear 2x more often. Solution: always Fisher-Yates or Sattolo (if you want cyclic permutation).
Applications of Random Shuffling
Education: Randomize the order of students to answer. Games: shuffle decks of cards, quiz questions, order of play. Work: randomize the order of presentation, randomize who gets the task. Music: shuffle playlists. Research: randomization of study groups. A/B testing: randomization of variants. Tournaments: bracket draw.
Shuffling in different languages
JavaScript: array.sort(() => Math.random() - 0.5) – BAD! Not Fisher-Yates. Correct: Fisher-Yates loop. Python: random.shuffle(list) – built-in, correct. PHP: shuffle($array) – Fisher-Yates built-in. Ruby: array.shuffle. Java: Collections.shuffle(list). SQL: ORDER BY RANDOM() or NEWID() (MS SQL) – for randomizing rows.
FAQ
Is array.sort(Math.random) in JS random?
NO – this is a common mistake. Array.sort does not guarantee uniform distribution with a random comparison function. Different JS engines (V8, SpiderMonkey) give different results. For example V8: items at the top of the list have a higher chance of being at the top after shuffle. Always use Fisher-Yates for correct shuffling.
How to randomly select N elements from a list without repetition?
Method 1: Fisher-Yates shuffle → take the first N elements. Method 2: iterate N times, randomize and remove from the pool. Method 3: reservoir sampling – for very large lists. Python: random.sample(list, N). JavaScript: shuffle(array).slice(0, N). SQL: SELECT * FROM table ORDER BY RANDOM() LIMIT N.
How to use the Presentation Order Randomizer?
Paste the names (one per line): Ania\nBasia\nKarol\nDarek. Click Shuffle. Result: random order. Refresh for new draw. Ability to copy the resulting list. Optional: number automatically (1. Ania, 2. Karol...).
Seed draws – how to reproduce the same result?
Seeded PRNG: provide seed → same sequence every time. Useful: when you want to document the draw (transparency). Math.random() in JS: not seeded, different on every refresh. Seeded: seedrandom library (npm). Python: random.seed(42). Use the draw date as the seed.
How many possible orders does a list of N elements have?
N! (factorial N). 5 items: 5! = 120. 10 items: 10! = 3,628,800. 20 items: 20! ≈ 2.43 × 10^18 (an astronomical number). Each card in a deck of 52 cards: 52! ≈ 8×10^67 – more than atoms in the universe. Therefore, each sh