Skip to content

Text tools

Line Sorter & Duplicate Remover

Sort lines alphabetically or by length, remove duplicates, trim spaces and drop blank lines. Perfect for keyword lists, emails and CSV columns.

Runs on your device — nothing is uploaded

Clean up a messy list: sort it, strip duplicates, trim stray spaces, and drop blank lines — all at once.

How to use this tool

  1. Paste your list, one item per line.
  2. Choose a sort order.
  3. Toggle the cleanup options.
  4. Copy the result.

Sort orders

  • A → Z and Z → A use natural sorting, so item2 comes before item10 instead of after it — the thing plain alphabetical sorting always gets wrong.
  • Shortest → longest is handy for spotting outliers in keyword lists.
  • Reverse current order flips what you have without re-sorting.
  • Shuffle randomly randomises the order, with a re-roll button.
  • Keep original order deduplicates and cleans without moving anything.

Options

  • Remove duplicates keeps the first occurrence of each line.
  • Trim spaces removes leading and trailing whitespace, which is usually why two apparently identical lines are not detected as duplicates.
  • Drop empty lines removes blanks.
  • Ignore case makes both the deduplication and the sort case-insensitive, so Apple and apple count as one entry.

Tips

  • Turn on Trim spaces and Ignore case together when deduplicating email lists — that combination catches the vast majority of real-world duplicates.
  • The counter tells you exactly how many duplicates were removed, which is a quick sanity check that your import worked.
  • To deduplicate a spreadsheet column, copy the column, paste it here, then paste the result back.

Related tools

FAQ

Is my list uploaded?

No. Sorting and deduplication run in your browser.

Which duplicate is kept?

The first one in the input. Everything after it is discarded.

Does the sort handle numbers correctly?

Yes. It uses natural sorting, so 2 sorts before 10. Plain alphabetical sorting would put 10 first because 1 precedes 2 as a character.

How does it sort accented or non-English text?

It uses your browser's locale-aware collation, which orders accented characters the way your language expects rather than dumping them after z.

Is there a size limit?

No hard cap, but very long lists (tens of thousands of lines) will feel slow because results recalculate as you type. Paste, then adjust options.

More text tools

Try these next