Sort Lines and Remove Duplicates
Paste a list of emails, keywords, file names or anything else with one item per line. Sort it, drop the duplicates and blank lines, and copy the clean list.
- Free
- Runs in your browser
- Dedupe in one click
- No sign-up
How It Works
Clean up a list in three steps.
Paste your list
One item per line, straight from a spreadsheet column, a text file or an email.
Choose order and options
Pick an order and decide whether to remove duplicates, trim spaces and drop empty lines.
Copy the result
The sorted list updates as you change options. Copy it when it looks right.
Sorting text lines, and the natural order trap
A plain alphabetical sort compares text character by character, so "file10" comes before "file2" because 1 is smaller than 2. Natural order reads the numbers as numbers and gives file1, file2, file10, which is usually what you want for file names, versions and numbered items. The alphabetical sorts here use your browser's language rules, so accented letters sort next to their base letter instead of after Z.
Keep original order with Remove duplicates ticked is the quickest way to dedupe a list without changing its sequence.
Duplicates removed, first kept
When a line appears more than once, the first occurrence stays and later copies are dropped.
Case-insensitive by default
"Apple" and "apple" count as the same line unless you tick Case-sensitive.
Trim spaces
Removes spaces at the start and end of each line, so "apple " and "apple" match.
Fair shuffle
Shuffle uses your browser's cryptographic random generator, so every order is equally likely.
Convert PDF Files and File Formats
Find the perfect online tool to combine PDF files, compress documents, and handle your daily workflow effortlessly.
PDF Tools
All your PDF needs in one place
- Merge PDF
- Organize PDF
- Split PDF
- Compress PDF
- Convert to Word
- Convert to Image
Image Tools
Edit and optimize your images
- Resize Image
- Compress Image
- Convert Format
- Crop Image
- Add Watermark
- Remove Background
Word Tools
Work with Word documents
- Convert to PDF
- Merge Documents
- Split Documents
- Compress File
- Edit Text
- Add Watermark
Excel Tools
Process Excel spreadsheets
- Convert to PDF
- Convert to CSV
- Merge Sheets
- Split Sheets
- Compress File
- Clean Data
Why Use This Line Sorter
Faster than a spreadsheet for a quick list.
Seven orders
A to Z, Z to A, natural, by length, reversed, shuffled or unchanged.
Cleans as it sorts
Remove duplicates, empty lines and stray spaces in the same pass.
Shows what changed
A summary tells you how many lines went in, came out and were removed as duplicates.
Private
Email lists and customer names never leave your browser.
Frequently Asked Questions
Questions people ask about the Sort Lines tool.
Choose Keep original order and tick Remove duplicates. The list keeps its sequence and only later repeats are removed.
That is alphabetical order, which compares one character at a time. Choose Natural (2 before 10) to sort numbers by their value.
Yes. Copy the column, paste it here and copy the result back. Each cell arrives as one line. If you copy several columns, each row becomes one line with tabs between the cells, and the sort uses the first cell.
By default yes: "Paris" and "paris" are duplicates and the first one is kept. Tick Case-sensitive to keep both.
Related Text & Developer Tools
More small utilities that run in your browser.
Text Diff Checker
Compare two texts and see what changed, line by line.
Find and Replace
Replace words or patterns in any text, with regex support.
Delimiter Converter
Switch CSV between comma, semicolon, tab and pipe.
Word Counter
Count words, characters, sentences and reading time.
Text Case Converter
Switch text to UPPER, lower, Title, camelCase and more.