Text & Productivity
How to Shuffle Lines and Randomize a List Fairly
Randomize line order for test data, study questions, names, prompts, and sample lists while understanding secure randomness, reproducibility, and fairness limitations.
In this article
How to Shuffle Lines and Randomize a List Fairly
Duck Cloud's Shuffle Lines randomizes line order using secure browser randomness.
Study questions
Shuffling can help prevent memorization based only on sequence.
Keep question-answer pairs together before shuffling.
Test data
Randomized fixture order can reveal code that accidentally depends on a fixed sequence.
Shuffle vs sample
Shuffling returns all items in a new order. Sampling selects only some items.
Reproducibility
Secure random shuffling is not designed to reproduce the same sequence.
For automated tests that must replay exactly, use a seeded random generator in your test framework.
Fairness
Do not use a general text shuffler for regulated lotteries, gambling, legal selection, or audited prize drawings.
Those scenarios require specialized procedures and auditability.
Duplicates
Shuffling preserves duplicate lines. Use Remove Duplicate Lines first only when duplicates are accidental.
Blank rows
Use Remove Empty Lines if blank rows have no meaning.
Randomization is easy; deciding whether you need unpredictability, repeatability, or audited fairness is the important part.