Randomize Text Lines Tool
Shuffles lines of text using Fisher-Yates, with optional Line Groups (1 to 100) that shuffle whole blocks while preserving internal order. Filters trim whitespace, skip empty lines, and skip duplicates; Preserve Input Line Numbers prefixes each output line with its original index. Sort Alphabetically bypasses the shuffle for lexicographic output; input comes from paste or .txt upload, and output exports as plain text or CSV.
This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.
Documentation
The Randomize Text Lines Tool shuffles, sorts, cleans, and exports line-based text using the Fisher-Yates algorithm for unbiased randomization. Removing duplicates and blank lines, grouping related items, and preserving original indices for audits support giveaways, meeting orders, classroom rotations, and scripting tasks alike. Alphabetical sorting gives repeatable output when that is needed instead of a fresh shuffle. Results export as TXT or CSV to move lists directly into spreadsheets, forms, or automation pipelines.
Shuffling, sorting, cleaning, and exporting line-based text serves writing, giveaways, and data preparation alike.
- Input comes from a pasted list or an uploaded .txt file, which loads fastest.
- Cleaning filters trim leading and trailing spaces from each line (Trim Lines), drop blank rows (Skip Empty Lines), and keep only the first occurrence of a duplicate line (Skip Duplicate Lines).
- Line Groups, from 1 to 100, control the unit of shuffling: 1 shuffles individual lines, and any larger value shuffles whole blocks of that size while preserving their internal order.
- Sort Alphabetically bypasses the shuffle entirely for lexicographic, repeatable output instead of a random order.
- Preserve Input Line Numbers prefixes each output line with its original index, useful for auditing fairness or tracing an entry back to its source position.
- Output exports by copying to the clipboard, or downloading as a plain text file or CSV, ready for spreadsheets, scripts, or forms.
- Trims apply before other filters. If Trim Lines is enabled, each line is set to
L.trim(). - Lines with zero length after the optional trim are removed when Skip Empty Lines is enabled.
- Deduplication works by content, preserving the first occurrence, when Skip Duplicate Lines is enabled.
- The sequence chunks by
gto form groups, then groups shuffle while order within each group stays fixed. - An unbiased Fisher Yates shuffle runs over lines or groups to ensure uniform randomness.
- Grouping is bypassed and the output sorts lexicographically when Sort Alphabetically is enabled.
Fair randomization, faster writing, and clean data preparation are the three recurring jobs.
- Run giveaways and raffles to randomize entrants, keep original indices for audits, and export winners as CSV.
- Mix creative prompts to reshuffle dialogue lines, ideas, or scenes and spark new drafting paths.
- Rotate tasks and schedules to build unbiased speaking orders, practice rotations, or testing queues.
- Prepare script inputs to trim noise, remove duplicates, and deliver clean line lists to automation tools.
- Order classroom activities to assign presentations, lab partners, or reading sequences fairly.
- Export structured results to CSV or TXT for spreadsheets, batch processing, and pipeline ingestion.
The Lines counter confirms the number of items in the output. An index prefix appears when Preserve Input Line Numbers is enabled. Each shuffle gives a different order when sorting is off, since the tool uses an unbiased Fisher Yates method; Sort Alphabetically instead gives stable, repeatable output. Line Groups keep small sequences intact while still randomizing their placement. CSV export suits import into spreadsheet software or automation scripts.
- Giveaway Winners: One name per line, with Skip Empty Lines and Skip Duplicate Lines enabled and Line Groups set to 1, shuffles into a fair winner order; the first N lines of the result are the winners.
- Meeting Order: Participant names with Preserve Input Line Numbers enabled keep track of the original order through a shuffle, ready to export as TXT to share with the team.
- Script Input: Paths or IDs with trims and filters enabled, plus Sort Alphabetically for predictable runs, download as CSV for a pipeline.
Does the tool guarantee fair randomness? Yes. The shuffle uses the Fisher Yates algorithm, which produces an unbiased distribution across permutations.
How do I avoid duplicate winners? Enable Skip Duplicate Lines to keep only the first instance of each entry before shuffling.
When should I use Line Groups? Use groups to keep small blocks together, such as multi line prompts or paired items, while still randomizing placement among other groups.
Why do I see the same order twice? Randomness can repeat by chance; shuffling again or switching to alphabetical sorting gives a different, or consistently ordered, result.
What format should I export? TXT suits simple sharing, and CSV suits loading into spreadsheets or automation tools that expect one value per row.
Inputs, outputs, and what the Randomize Text Lines Tool computes
What the Randomize Text Lines Tool asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.
Inputs
- Input Text Lines
- Randomized Output Lines: 0
- Line Groups (numeric input) · default: 1 · range: 1 to 100
- Remove whitespace from start and end of each line · default: off
- Remove duplicate lines from input · default: on
- Remove blank lines from input · default: on
- Show original line numbers before each line · default: off
- Sort output alphabetically instead of shuffling · default: off
Controls
Download Text File · Copy to Clipboard · Reset All · Download CSV File
Example
Giveaway Winners: One name per line, with Skip Empty Lines and Skip Duplicate Lines enabled and Line Groups set to 1, shuffles into a fair winner order; the first N lines of the result are the winners.