Free Online Line Sorter & Deduplicator

Paste a list below, one item per line, to sort it and/or remove duplicate lines.

Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.

What the Line Sorter & Deduplicator does

The Line Sorter & Deduplicator cleans up a list with one item per line. With Remove duplicates on, only the first occurrence of each line is kept. With Sort on, the lines are put in alphabetical order. Both options are on by default; switch either off to only dedupe (keeping the original order) or only sort.

Case-insensitive treats Apple and apple as the same line when removing duplicates and ignores case when sorting. Sorting uses the browser's locale-aware comparison, so accented letters sit next to their plain versions instead of after z. The list is processed in your browser and the result replaces the text in the box, ready to copy.

When to use it

  • Merging two email or customer lists and removing the repeated entries.
  • Sorting a list of dependencies, keywords or tags before committing it.
  • Finding the distinct values in a column copied from a spreadsheet or a log.
  • Cleaning a word list for a spell-checker or a search synonym file.

Worked example

banana apple Banana apple cherry

apple banana Banana cherry

banana apple Banana apple cherry (case-insensitive)

apple banana cherry

Common questions about the Line Sorter & Deduplicator

Which duplicate is kept?

The first one in the list. With case-insensitive mode, that also decides the spelling that survives: if Banana appears before banana, the capitalised form stays.

Why are lines with trailing spaces not treated as duplicates?

Lines are compared exactly, so apple and apple (with a space) differ. Run the Whitespace & Line Trimmer first to remove trailing spaces, then dedupe.

Does it sort numbers numerically?

No, it sorts as text, so 10 comes before 9. Pad numbers with leading zeros (09, 10) or sort them in a spreadsheet if you need numeric order.

How do I compare two lists instead of merging them?

Sort both lists here, then paste them into the Text Diff Checker. Lines present in only one list show up as added or removed.

Is this tool free?

Yes, it's free to use. No signup, no email required. Get results on this page.

How do I get my result?

Use the tool on this page. Your result appears here; no email delivery is required.