Wall of Tools

Line Tools: Sort, Remove Duplicates and Tidy Up a List

Paste a list and tick the steps you need: trim spaces, remove blank and duplicate lines, sort A to Z or by number, add text, number the lines or join them into one.

  • Runs in your browser, nothing is uploaded
  • Free, no sign-up
  • 33 automated checks

Steps, applied from top to bottom

Sort, de-duplicate and tidy a list in seconds

An email list copied from three spreadsheets, product codes pasted from a report, names collected in a chat, keywords from a brainstorm: lists arrive messy. Some lines are repeated, some are blank, some have stray spaces, and they are in no useful order. Excel can sort and remove duplicates, but only after you paste the list into a sheet, and it does not remove blank lines or add numbering in the same step.

Paste the list on the left, tick the steps you want in the middle, and the clean list appears on the right. The steps run from top to bottom, like a recipe, so you always know what happened to your lines. Nothing is uploaded.

What it can do

  • Trim spaces at the start and end of each line, which is the hidden reason "Anna" and "Anna " are not seen as the same.
  • Remove empty lines.
  • Keep or remove lines that contain a word, such as keeping only lines with "@" from a messy contact list.
  • Remove duplicates, keeping the first one, with or without paying attention to capitals.
  • Sort A to Z or Z to A in natural order (item 2 comes before item 10), by the number in each line, by length, in reverse, or shuffle randomly.
  • Add text before or after every line, for example quotes and a comma to turn a list into SQL or code.
  • Number the lines, or join them into one line with commas, ready to paste into an email "To" box or a search filter.
  • Split one line into many, for the opposite job: a comma-separated list becomes one item per line.

How to use it

  1. Paste your list on the left, one item per line. A column copied from Excel or Google Sheets arrives like this already.
  2. Tick the steps you want. Some have options underneath. The result updates straight away, and the line under the steps says how many lines were removed.
  3. Copy the result, or press Use as input to run more steps on it.

Good to know

  • Natural sorting compares the numbers inside text as numbers, so "Room 9" comes before "Room 10", and accented letters sort with their plain letters.
  • Sorting by number uses the first number in each line, including decimals and minus signs; lines without a number go last.
  • Shuffle uses your browser's secure random generator, so it is fair for draws. For picking winners or splitting teams, the Random Picker does more.
  • Your list stays here. It is processed in this page and is not saved.

How this tool was tested

Before publishing, I ran 33 automated checks on the finished page in Microsoft Edge, which is built on Chromium like Chrome. Last full run: 15 November 2026.

  • Every step on its own: trimming, empty lines, keeping and removing lines that contain a word, duplicates with and without capitals, natural A to Z and Z to A, sorting by number (with decimals, minus signs and thousands separators), by length, reverse, adding text, three numbering styles, joining and splitting.
  • Steps together, in the order shown, with the removed lines counted correctly.
  • 300 random lists shuffled after removing duplicates: every line came out exactly once and nothing was lost.
  • Fairness of Shuffle: 6,000 shuffles of three lines, each line came first about a third of the time.
  • Using the tool and speed: the sample, the highlighted steps, Use as input, Split, Clear, and 100,000 lines de-duplicated and sorted in well under a second.

What the tests did not cover: Safari and Firefox were not tested. Sorting follows English alphabet rules; other languages may order some letters differently. Something not working? Tell me on the contact page.

FAQ

Which duplicate is kept?

The first one, in its original spelling. Later copies are removed.

How many lines can it handle?

Hundreds of thousands. A list of 100,000 lines is sorted and de-duplicated in well under a second on a normal laptop.

Does the order of the steps matter?

Yes, which is why they always run in the order shown. Trimming before removing duplicates, for example, catches copies that differ only by a trailing space.

Published 16 November 2026