Shuffle Lines Text
Randomize the order of a list — draws, playlists, running orders.
Shuffle Lines is a free online tool that randomize the order of a list — draws, playlists, running orders. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.
- Price
- Free — no account, no quota, no watermark
- Category
- Text
- Where it runs
- In your browser, on your device
- Files uploaded
- None
- Technology
- plain JavaScript
- Settings
- 1
- Works offline
- Yes, after the first visit
About Shuffle Lines
This uses a Fisher-Yates shuffle, which is the only common shuffling algorithm that produces every permutation with equal probability. The naive alternative — sorting with a random comparator — is subtly and badly biased, because comparison sorts assume a consistent ordering and a random comparator does not provide one. The randomness comes from the browser's cryptographic generator.
How to use it
- Paste the text you want to run through shuffle lines.
- Set drop empty lines.
The one setting
| Setting | What it does | Default |
|---|---|---|
| Drop empty lines | On or off. On by default. | On |
Under the hood
| Runs on | plain JavaScript — runs the whole thing |
| Controls | Drop empty lines |
Questions
Is the shuffle really random?
It draws from `crypto.getRandomValues`, the same generator used for cryptographic keys, rather than `Math.random`. Combined with Fisher-Yates, every ordering is equally likely.
Why not just sort by a random value?
Because `sort((a, b) => Math.random() - 0.5)` is measurably biased — different sort implementations produce different distributions, and none of them is uniform. It is a well-documented mistake.