📝 Line Sorter and Deduplicator
Sort, deduplicate, shuffle, reverse, or trim lines of text. Case-insensitive, natural sort, length sort, and prefix/suffix options.
Last updated: May 21, 2026 · By Λ
Sort and dedupe lines without leaving your browser
Sorting a list of items, removing duplicates, and shuffling order are common chores when working with text. People reach for command-line tools like sort and uniq, or they paste into a spreadsheet, or they write a one-off Python script. This tool does the same job in your browser with a few clicks. Paste your list, pick the operations you want, and copy the result. Nothing is uploaded.
Beyond the basic alphabetical sort, you get a natural-order sort (so "item2" comes before "item10"), length-based sort, and a deterministic shuffle that uses crypto.getRandomValues for an unbiased Fisher-Yates pass. Deduplication can be case-sensitive or case-insensitive. You can trim whitespace, drop empty lines, lowercase everything, and add a prefix or suffix to every output line. Useful for prepping data for command-line tools, building bullet lists for documents, or cleaning lists of emails, URLs, and identifiers.
How to use this tool
- Paste your lines into the Input box, one per line.
- Pick a sort mode and check any cleanup options you want.
- Optionally add a prefix or suffix to wrap each line.
- Read the result in the Output box and click "Copy" to put it on your clipboard.
- Click "Use Output as Input" to chain another pass with different options.
Frequently Asked Questions
What is a natural sort?
A natural sort treats consecutive digits as numbers. With a plain alphabetical sort, "file10.txt" comes before "file2.txt" because "1" is less than "2" at the character level. Natural sort puts "file2.txt" first because it recognizes the numeric segment.
How does shuffle work?
Shuffle uses a Fisher-Yates pass with random indices from the Web Crypto API. The result is uniformly random and unbiased. Two consecutive shuffles will almost certainly produce different orders.
Does it handle very large lists?
The tool comfortably handles up to about a million lines on a modern laptop. Beyond that, browser memory becomes the bottleneck.
In what order are the operations applied?
Trim, then drop empties, then lowercase, then dedupe, then sort, then prefix and suffix. This order means dedupe sees the already-trimmed values, so " foo " and "foo" become a single line when trim is on.