Line Sort & Deduplicate
Sort lines alphabetically, numerically, or by length. Remove duplicate lines, blank lines, and trim whitespace. Reverse sort order.
Examples
Unsorted word list with duplicates
In:banana
apple
cherry
apple
banana
date
cherry
fig
Numbered list
In:10 items
2 items
100 items
1 item
20 items
3 items
How to Use Line Sort & Deduplicate
- Paste or type your lines into the input area.
- Choose a sort order from the dropdown (alphabetical, numeric, by length, or random).
- Toggle options like "Remove duplicates", "Remove blank lines", or "Trim whitespace".
- The output updates automatically as you type or change options.
- Click "Copy" to copy the result to your clipboard.
About Line Sorting & Deduplication
This tool sorts lines of text and optionally removes duplicates, blank lines, and extra whitespace. It is useful for cleaning up word lists, log files, CSV columns, configuration entries, or any line-separated data. All processing is instant and runs entirely in your browser.
Random shuffle is handy for randomising quiz answers, playlist orders, or test data. Numeric sort correctly orders numbers (e.g., 2 before 10) unlike a plain alphabetical sort.