Shuffle Lines
Randomise a list for draws, playlists or fair ordering.
How Shuffle Lines works
Randomise the order of lines in a list, with an option to keep or drop blank lines. Everything happens inside this page: the tool reads your input, runs the calculation or conversion locally, and hands the result back to you. Nothing is transmitted, because there is no backend to transmit it to.
That design choice is deliberate. Most free tool sites upload your files to a server, process them there, and quietly keep a copy. Toolcin cannot do that — the site is a set of static files. If your connection dropped the moment the page finished loading, every tool would still work.
A real shuffle, not a sort with a random key
The list is shuffled with the Fisher–Yates algorithm, which swaps each element with a random one that has not been placed yet. Every ordering is equally likely.
The naive alternative — sorting by Math.random() — looks random and is not: some orderings become far more likely than others, and the bias is invisible in a short list.
Blank lines
By default blank lines are removed before shuffling, because a blank line in a list is usually a formatting artefact rather than an item. Turning the option on keeps them in the pool, so they end up in random positions in the output.
For a list of names or tasks, leave it off. For a file where blank lines carry meaning, turn it on.
| Use | Blank lines |
|---|---|
| Raffle or draw | Off |
| Task order for the day | Off |
| Shuffling a formatted document | On |
Independent runs
Each click produces a new ordering with no memory of the previous one. Shuffling twice does not guarantee a different result — with a short list, the same order can come back, and that is correct behaviour rather than a bug.
Good to know
- Works offline once loaded, including on flights and in locked-down networks.
- No file size limit beyond your device's own memory.
- Free to use, with no account and no usage counter.
- Results are produced locally, so they are not logged or shared with anyone.
Questions
Is the shuffle fair?
It uses a Fisher–Yates shuffle on Math.random, which is even across positions for practical use.
Can I keep blank lines?
Yes, leave the option ticked.
Is it suitable for a lottery?
For a casual draw, yes. For anything with money attached, record the input list and the moment of the draw.
Can I shuffle a CSV?
Yes — whole lines move, so rows stay intact.
Keep going
More text tools
Number Lines
Add sequential numbers to every line, with a custom start value and separator style.
Open toolAdd Prefix & Suffix
Prepend or append text to every line in a list, ideal for building URLs, SQL values or markup.
Open toolExtract Emails
Extract every email address from a block of text, de-duplicated and sorted.
Open toolExtract URLs
Extract every URL from text, with unique filtering and an HTTPS-only option.
Open toolExtract Numbers
Extract all numbers from text, including decimals and negatives, with optional de-duplication.
Open toolRemove Punctuation
Strip commas, quotes, brackets and symbols from text while optionally keeping apostrophes.
Open tool