Browser tool
Line Sorter & Duplicate Remover
Paste a list and choose what to remove: duplicate lines, blank lines, or both. Sort A–Z or Z–A, and watch the cleaned list update as you type.
Result
0 lines
Duplicate removal compares lines exactly, including capitalization and spaces.
What each option does
Sorting reorders the remaining lines. Duplicate removal keeps the first occurrence of an identical line. Empty-line removal drops lines that contain only spaces or tabs.
Order of operations
Empty lines are removed first, then duplicates, then the list is sorted. The original text in the input box is never changed, so you can keep adjusting the options.
A worked example
With Sort A → Z, Remove duplicate lines, and Remove empty lines all enabled, this input:
banana apple apple Cherry
becomes:
apple banana Cherry
The first occurrence of apple is kept, the blank
line is dropped, and the summary reads
5 → 3 lines · 2 removed.
Sorting rules and numbers
Sorting uses the browser’s English collation. Capitalization, accents, and leading spaces
affect the order, and numbers are compared as text: 10
comes before 9. Remove empty lines drops
whitespace-only lines, but it does not trim indentation from lines that contain text. If
you need numeric order, pad the numbers first or sort them in a spreadsheet.
Duplicate removal is exact
Two lines are duplicates only when every character matches, including case and spacing.
Apple and apple
are different, and so are Apple and
Apple . Windows, old Mac, and Unix line endings are
all recognized as line breaks on input; the output always uses a single
\n between lines, so a Windows editor may report a
different line-ending style.
When this is the right tool
It fits lists where each line is one item: email addresses, tags, keywords, allow-list entries, or a column pasted out of a spreadsheet. It is not a general spreadsheet or database tool. Sorting ignores a header row unless you remove it first, duplicate removal cannot ignore case, and very large inputs are handled in one pass in the page, so a file with hundreds of thousands of lines may briefly freeze the tab while it processes.
If the result is empty, the input was empty or contained only blank lines with Remove empty lines enabled. Tabs and emoji are preserved as characters, and there is no line length limit beyond what the browser can hold in memory. For case-insensitive deduplication, normalise the text first; this tool intentionally keeps the comparison exact.
Related tools
The next step in the same task — and still nothing leaves this browser.