Line Sort / Dedupe

Sort lines alphabetically or naturally, remove duplicate and empty lines, trim whitespace or reverse a list. Free online line sorter that runs in your browser.

About this tool

Sort lines of text and remove duplicates in one step. It is handy for cleaning up lists of IDs, emails, log lines or package names.

How to use

  1. Paste one item per line.
  2. Pick an order (A→Z, Z→A, natural, by length or reverse) and toggle dedupe, trim and empty-line removal.
  3. Copy the cleaned list; the status bar shows how many lines remain.

Frequently asked questions

What is natural order?

Natural order compares numbers by value, so item2 comes before item10 instead of after it.

Which duplicate is kept?

The first occurrence is kept and later duplicates are removed. With Ignore case, "Apple" and "apple" count as the same line.

Does it change my line endings?

Windows (CRLF) and Unix (LF) line breaks are both accepted, and the output uses LF.

Related tools