Sort Lines & Remove Duplicates

Paste a list with one item per line and choose what to do with it. Each button changes the text in place, and the undo arrow takes you one step back.

How to sort a list

  1. Paste or type your list into the box, one item per line.
  2. Press Sort A–Z or Sort Z–A. Combine it with Remove duplicates and Remove empty lines to clean the list up.
  3. Press ↶ to undo a step, then copy the result.

How the sorting works

Sorting follows the alphabet rules of this page’s language, so accented letters land where a dictionary would put them instead of at the very end. Upper and lower case are treated as equal.

Numbers inside the text are compared by value: “item 2” comes before “item 10”, which ordinary text sorting gets wrong. A list of plain numbers is therefore sorted from smallest to largest.

Useful combinations

  • Clean a mailing or keyword list: remove empty lines, remove duplicates, then sort A–Z.
  • Random order: shuffle a list of names for a draw, seating plan or presentation order.
  • Newest first: reverse a log or a chronological list.
  • Duplicates: the first occurrence is kept; spaces at the start or end of a line are ignored when comparing.

Frequently asked questions

Is my list uploaded?

No. Everything happens in your browser.

Is duplicate removal case-sensitive?

Yes. “Apple” and “apple” are kept as two different lines.

How many lines can I sort?

Tens of thousands of lines are handled without trouble on a normal phone or computer.

Can I undo a change?

Yes. The ↶ button restores the previous state, up to 30 steps back.

Related tools