Shuffle Lines
Randomize the order of lines in your text. Uses Fisher-Yates shuffle for true randomness.
Paste a list of lines, hit Shuffle, and get them back in random order using a proper Fisher-Yates algorithm — no position bias, no favored items. Works for raffles, quiz questions, playlists, student names, or any ordered list you want scrambled. And everything runs in your browser. Nothing gets uploaded.
How It Works
The Fisher-Yates algorithm walks backward through your list, swapping each line with a randomly chosen line before it. This produces a truly unbiased permutation — every ordering is equally likely. It runs in O(n) time, so even a 10,000-line file shuffles instantly.
Examples
Randomizing a Class Presentation Order
A teacher needs to assign random speaking slots so nobody complains about favoritism.
Alice
Bob
Charlie
Diana
Ethan
Diana
Ethan
Alice
Charlie
Bob
Shuffling Quiz Questions for an Exam
You're building two versions of a test. Shuffling the question list gives you Version B without rewriting anything.
Q1: What is the capital of France?
Q2: Who wrote Hamlet?
Q3: What is 7 × 8?
Q4: Name the largest ocean.
Q5: What year did WW2 end?
Q6: Define photosynthesis.
Q4: Name the largest ocean.
Q1: What is the capital of France?
Q6: Define photosynthesis.
Q3: What is 7 × 8?
Q5: What year did WW2 end?
Q2: Who wrote Hamlet?
Randomizing a Spotify Playlist Export
Exported playlists are sorted by date added. Shuffle to break out of the same opening tracks every time.
Bohemian Rhapsody - Queen
Blinding Lights - The Weeknd
Shape of You - Ed Sheeran
Stairway to Heaven - Led Zeppelin
Shape of You - Ed Sheeran
Stairway to Heaven - Led Zeppelin
Bohemian Rhapsody - Queen
Blinding Lights - The Weeknd
Who Uses This
Randomize student presentation order, seating charts, or group assignments without anyone calling bias.
Generate shuffled test data for unit tests, randomize seed lists, or scramble CSV rows before sampling.
Draw raffle winners, set random bracket positions, or shuffle trivia questions for game night.
Mix up social media post schedules, reorder video ideas, or randomize poll options so the first choice doesn't always win.
Common Mistakes
If your entire text sits on one line, there's nothing to shuffle. Make sure each item is on its own line — hit Enter between them. A single paragraph won't get rearranged.
Each shuffle is random. If you need a specific shuffled order saved, copy the output right away before clicking Shuffle again. There is no undo button that restores the previous arrangement.
Blank lines count as lines too. After shuffling, you might see random gaps scattered through your output. Clean up empty lines from your input first if you don't want them in the mix.
Technical Details
- Processing: 100% client-side — your text never leaves the browser
- Algorithm: Fisher-Yates (Knuth) shuffle — O(n) time complexity
- Browser Support: Chrome, Firefox, Safari, Edge
- Line Limit: No hard cap — tested with 50,000+ lines
Frequently Asked Questions
Is the shuffle truly random?
It uses the Fisher-Yates algorithm with JavaScript's Math.random(), which gives you a pseudo-random shuffle. For classroom picks, playlist mixing, or quiz ordering, it's more than random enough. It won't pass cryptographic standards, but that's not what this is for.
Can I shuffle lines in a CSV file?
Yes — open your CSV in a text editor, copy all the rows (skip the header), paste them here, shuffle, then paste back. Just make sure you don't shuffle the header row in with the data, or you'll end up with column names in the middle of your file.
Does this tool save or upload my text?
No. The entire shuffle happens in your browser using JavaScript. Nothing gets sent to a server. Close the tab and your data is gone — there's no database, no cookies, no tracking involved.
How many lines can I shuffle at once?
There's no set limit. The tool handles tens of thousands of lines without breaking a sweat. If your browser can hold the text in a textarea, this tool can shuffle it. Performance only starts to slow around 100,000+ lines on older machines.
Can I undo a shuffle?
Not directly — once you shuffle, the previous order is gone. Best practice: copy your original list before shuffling, or keep it in a separate tab. That way you always have the original if you need to go back.