CraftTools

Sort & Dedupe Lines

Guide: How to Clean Up Text Copied From PDFs and Websites

0 lines

Nothing you enter or choose here leaves your device. This tool runs in your browser.

How to use

  1. 1Paste your list into the box, one item per line.
  2. 2Choose whether sorting is case sensitive and whether numbers sort naturally.
  3. 3Click an action: sort A to Z, sort Z to A, reverse, remove duplicates, trim or remove empty lines.
  4. 4Click Copy, or Undo if you want to go back one step.

Frequently asked questions

What is natural number order?

It sorts numbers inside text by value, so "item2" comes before "item10" instead of after it.

Does removing duplicates keep the original order?

Yes. The first time a line appears it is kept, later copies are removed, and the order is unchanged. Duplicates are matched ignoring case unless "Case sensitive" is on.

Can I combine actions?

Yes. Each action works on the current text, so you can trim, then remove duplicates, then sort. Undo steps back one action.

Is there a limit on list size?

There is no fixed limit. Lists of tens of thousands of lines work fine, depending on your device.

Read the guide

Learn how this works and how to get the most from it.

Writing & text

How to Clean Up Text Copied From PDFs and Websites

Fix broken line breaks, double spaces and stray characters in copied text, then sort, number and tidy it in a few clicks.

2 min read

Remove Line Breaks

Join lines into one paragraph. Strip breaks from copied text.

Add Line Numbers

Number every line of text, or strip existing numbers.

Find and Replace

Find and replace text online, with regex, case and whole-word options.

Text Diff Checker

Compare two texts side by side and see exactly what changed.