100% Local — never leaves your browser

Duplicate Line Remover & Text Sorter

Remove duplicate lines, sort text alphabetically, and strip empty lines instantly in your browser — combine any of the three.

Output
Ad slot

How to use this tool

This tool handles three common line-by-line cleanup tasks that come up constantly with lists, logs, exported data, and copy-pasted text: getting rid of blank lines, removing repeated entries, and putting everything in alphabetical order. Rather than three separate tools, all three work together here — turn on whichever ones you need.

For example, pasting banana\n\nApple\napple\ncherry with Remove Empty Lines, Remove Duplicates (case-insensitive), and Sort A-Z all on produces Apple\nbanana\ncherry.

Paste your text into the box, toggle any combination of Remove Empty Lines, Remove Duplicates, Sort A-Z, or Sort Z-A, and the result updates automatically below. Click Copy to copy it.

FAQ

Is this tool free to use?

Yes, this tool is completely free to use with no limits on how often you can use it.

Does my text get uploaded anywhere?

No. Every operation runs directly in your browser as you type. Your text never leaves your computer.

Can I use more than one option at once?

Yes — toggle any combination of Remove Empty Lines, Remove Duplicates, and a sort order together. They're applied in a fixed, predictable order: empty lines are cleaned up first, then duplicates are removed, then the result is sorted last, so turning on a sort order always sorts the final list regardless of what order you clicked the buttons in.

Which line is kept when a duplicate is removed?

The first occurrence. If "Case-sensitive" is off, lines that differ only in case (like "Apple" and "apple") are treated as duplicates of each other, and whichever one appeared first in your text is the one that's kept — including its original capitalization.

What counts as an "empty" line?

A line with no content, or a line containing only spaces or tabs. A line that looks blank but has trailing whitespace is still removed by Remove Empty Lines.

Related Tools