Remove Duplicate Lines

TL;DR

This tool removes duplicate and empty lines from text entered one item per line, then sorts alphabetically and adds numbering, all in one pass.

The processing order is: trim → remove empty lines → remove duplicates → sort → number.

Options

How to use

  1. Enter text — paste your text into the input box, one item per line.
  2. Pick options — check remove duplicates, remove empty lines, trim, sort and numbering as needed.
  3. Run and copy — the processed result appears in the output area; use the copy button to copy it.

Processing options

Line processing options
OptionWhat it does
Remove duplicate linesKeeps only the first occurrence of fully identical lines.
Remove empty linesDeletes lines that are blank or contain only whitespace.
Trim each lineRemoves leading and trailing whitespace and tabs from every line.
Ignore caseTreats lines that differ only in case as duplicates.
SortSorts lines in ascending or descending locale-aware order.
Add numberingAdds "1. ", "2. " style numbers in front of the final lines.

This tool is handy for cleaning up email address lists, removing duplicate keyword lists and sorting name lists — any text with a lot of repeated items.

Frequently Asked Questions (FAQ)

Does dedupe work line by line?

Yes. The text is split on line breaks and fully identical lines are removed. It does not delete matching substrings inside other lines.

Can it treat lines as duplicates regardless of case?

Yes. Turn on the 'ignore case' option to treat Apple and apple as the same line, keeping only the first occurrence. With it off, lines that differ only in case are treated as different.

Does sorting work for any language?

Yes. Lines are sorted using locale-aware comparison, so ascending (A to Z) and descending (Z to A) order work for letters, numbers and other scripts.

If I apply several options at once, what order are they applied in?

The order is: trim whitespace, remove empty lines, remove duplicates, sort, then number. So numbering is always based on the final sorted lines, starting at 1.

Related tools & guides

Last updated: 2026-06-25