How to use the random line picker
- Paste your text into Text. Each line is one entry.
- Set Lines to pick, from 1 to 1,000.
- Choose the options: Allow repeats lets a line come up more than once, Keep original order lists the picks in the order they appear in your text, and Skip blank lines (on by default) leaves empty lines out of the draw.
- Press Pick lines and copy the result.
What it does and when to use it
Use it to sample a long list: pick 20 rows from a customer list to check by hand, choose five questions from a question bank, draw a random quote from a file of favourites, or pull test cases from a log. Because it returns plain lines, you can paste the result back into a spreadsheet or document without cleaning it up.
For a list in a new order rather than a sample, use the list shuffler. To split the lines into teams, use the random team generator. If some lines should be more likely than others, the weighted random picker accepts a weight on each line.
How it works
The text is split at every line break. With Skip blank lines on, lines with only spaces are removed; otherwise they stay in the pool as empty entries. Each remaining line keeps its position number.
Without repeats, the tool shuffles the lines with a Fisher–Yates shuffle and takes the first ones, so every set of lines is equally likely. With Allow repeats, each pick is an independent draw. Both use crypto.getRandomValues for the random numbers. Keep original order then sorts the chosen lines by their position number.
Worked examples
The whole poem, in order. The sample text has five lines. Asking for 10 lines with Keep original order ticked returns all five in their original order, from “Line one of the poem” to “Fifth and final”, plus the note “Only 5 lines are available without repeats.”
Blank lines counted. The text a, an empty line and b, with Skip blank lines off and 5 lines requested, has three entries, so you get a, an empty line and b in some order and the note “Only 3 lines are available without repeats.”
Two random lines (the default). One of the ten possible pairs from the poem, in random order.
Limits and tips
- Very long single lines are fine; the limit is on the number of picks, not line length.
- Lines are kept exactly, including spaces at the start, so indentation and code survive.
- Your text is processed in your browser and never uploaded.
Frequently asked questions
How is this different from the random picker?
What does Keep original order do?
Can a line be picked twice?
Are duplicate lines treated as one?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.