Shuffle Lines
Randomize the order of lines in your text. Click 'Shuffle again' for a new ordering.
About Shuffle Lines
This tool randomly permutes the lines of your input using the Fisher–Yates shuffle, which produces an unbiased random ordering. Each line keeps its content exactly; only the order changes. Useful for randomizing a list of names, shuffling questions, or anonymizing the order of items.
When to use it
- Picking a random order for a list of names or candidates
- Shuffling quiz questions or game prompts
- Anonymizing the order of items before sharing
- Generating a random presentation order from a roster
How it works
Lines are split on LF/CRLF. The Fisher–Yates algorithm walks the array from end to start, swapping each element with one at a random earlier (or same) position — producing every possible permutation with equal probability. Math.random is used as the entropy source.
Examples
Each invocation produces a different permutation
alice bob carol dave
carol alice dave bob
Frequently asked questions
- Is the randomness cryptographically secure?
- No. Math.random is a pseudorandom generator suitable for visual shuffling but not for security-sensitive use (drawing lottery numbers, generating tokens).
- Can I reproduce a shuffle?
- Not from this tool — there's no seed. If you need reproducible randomness, generate the shuffle programmatically with a seeded RNG.
- Why does the output change each time?
- By design. Each render picks a new random permutation. The 'Shuffle again' button forces a re-render so you can keep trying.