Line Tools
Clean up and reorder lines of text in one pass: trim whitespace, drop empty or duplicate lines, sort alphabetically/numerically/by length, reverse or shuffle the order, and add line numbers — combine any of them and see a lines-in/lines-out summary. Runs entirely in your browser, no sign-up.
Input
Clean up
Exact match; keeps the first occurrence of each line.
Reorder
Numbering
Adds "1. ", "2. ", … in front of each remaining line — applied last, after clean up and reorder.
Output
Stats
| Metric | Value |
|---|---|
| No data yet | |
Guides
What this tool does
Paste any list — log lines, CSV rows, URLs, names, keywords — and combine several line operations in a single pass: trim whitespace, drop empty or duplicate lines, sort the result (alphabetically, numerically, or by length), reverse or shuffle the order, and add sequential line numbers. Instead of running a list through several separate cleanup tools, set the options you need once and get the finished list back with a lines-in/lines-out summary.
How to use it
- Paste your text into the Lines box, or upload a
.txtfile directly. - Turn on whichever Clean up options you need (trim, remove empty lines, remove duplicates).
- Pick a Sort / shuffle mode if you want the lines reordered.
- Turn on Add line numbers if you want a numbered list back.
- Click Process lines. The Result box fills in, along with a stats table showing lines in, empty lines removed, duplicate lines removed, and lines out.
- Copy or download the result.
Options explained
- Trim whitespace from each line — strips leading/trailing spaces from every line before anything else runs.
- Remove empty lines — drops blank or whitespace-only lines.
- Remove duplicate lines — exact-match dedupe that keeps the first occurrence of each line.
- Sort / shuffle — no change, alphabetical (A→Z or Z→A), numeric (low→high or high→low — lines that aren't numbers sort to the end either way), by length (short→long or long→short), reverse the current order, or shuffle randomly with an unbiased Fisher-Yates shuffle.
- Add line numbers — applied last, after clean up and reordering, so the numbers always match the final line order.
Operations run in a fixed order — trim, then remove empty lines, then dedupe, then sort/shuffle, then number — so you can combine all five and still get a predictable result.
Example
Input, with trim + remove empty lines + remove duplicates + sort A→Z all turned on:
banana
apple
cherry
apple
cherry
Output: apple, banana, cherry — 6 lines in, 1 empty line removed, 2 duplicate lines removed, 3 lines out.
Privacy
This tool runs entirely in your browser — your text never leaves your device or touches a server, even when using the file upload.