Remove Duplicate Lines

Delete repeated lines, with options to ignore case, trim whitespace and sort the result.

Runs in your browser Text Tools

How to use

  1. Paste your text into the input box, one item per line.
  2. Choose whether to ignore case, ignore leading/trailing whitespace, drop empty lines or sort the result.
  3. Click Process. The result appears in the output box, ready to copy or download as TXT.

Frequently asked questions

Which line is kept when case is ignored?
The first occurrence is kept, with its original capitalization and whitespace. Later lines considered duplicates are removed.
Can it handle tens of thousands of lines?
Yes. Deduplication uses a Set locally in your browser and usually finishes instantly. For extremely large text (hundreds of thousands of lines), paste it in batches.
Does sorting change the original order?
By default the original order is kept. Only when you enable "Sort result" is the deduplicated list reordered alphabetically.

Privacy & data handling

This tool runs entirely in your browser. Text you type and files you choose are never uploaded to a server or saved by ToolNest. Closing the page removes everything.