Sort Lines & Remove Duplicates

Paste a list with one item per line, then sort it, remove repeats and clear out blank lines in one go.

Ce contenu est en anglais.

Exemples détaillés

Sorting a list and removing repeats

Lines item 10, item 2, apple, item 2, with A to Z sorting and remove duplicates ticked

apple item 2 item 10 The message reads 4 lines in, 3 lines out, 1 duplicate removed.

The sort is natural, so "item 2" comes before "item 10", and the first copy of a repeated line is kept.

Sorting numbers highest first

Lines 3 apples, 12 pears, 7 plums, with the numbers highest first option chosen

12 pears 7 plums 3 apples The message reads 3 lines in, 3 lines out.

Lines are ordered by the number at their start, so text without a leading number would be placed after the numbered lines.

À propos de Sort Lines & Remove Duplicates

A line sorter puts a pasted list into order and tidies it at the same time. Sort alphabetically in either direction, by line length, or by the number each line starts with, or reverse or shuffle the list. You can also remove duplicate lines, trim stray spaces and delete blank lines, all in a single pass.

Sorting treats numbers inside text naturally, so item 2 comes before item 10. Duplicates are compared exactly unless you choose to ignore capital letters, and the first copy of a repeated line is the one kept. A short summary shows how many lines went in, how many came out and how many duplicates were removed.

Comment utiliser Sort Lines & Remove Duplicates

  1. Paste your list with one item on each line.
  2. Choose a sort order, or keep the current order.
  3. Tick the clean-up options you want, such as removing duplicates.
  4. Copy the result from the output box.

Usages courants

  • Cleaning a mailing or keyword list
  • Putting names, tags or file lists in alphabetical order
  • Finding the largest or smallest values in a list of numbers
  • Picking a random order for a draw or rota

Questions fréquentes

How do I remove duplicate lines?

Paste your list and leave the remove duplicates option ticked. Each repeated line is dropped and the first copy is kept. The summary beneath the box tells you how many were removed. Tick ignore capital letters if Apple and apple should count as the same.

How does alphabetical sorting work?

Lines are ordered using UK English rules, ignoring the difference between capital and small letters, and numbers inside text are compared by value. That means file2 comes before file10. Lines that differ only in case keep a steady order.

Can I sort numbers properly?

Yes. Choose Numbers, low to high or high to low. Each line is sorted by the number it starts with, including negatives and thousands separators. Lines with no number at the start are placed at the end, in alphabetical order.

What do trim and remove blank lines do?

Trim removes spaces and tabs from the start and end of every line, so lines that differ only by stray spaces count as duplicates. Remove blank lines deletes lines that are empty or contain only spaces, which is useful for pasted text with gaps.

Is the random order really random?

The shuffle uses a high-quality random number source, and every order is equally likely. Choosing Sort again shuffles the list afresh each time, which is handy for drawing names or deciding who goes first.