Remove Duplicate Lines

Delete repeated lines from a list. Your text stays on your device.

  • 0Duplicates removed
  • 0Lines before
  • 0Lines after

Paste a list, one item per line: the tool removes duplicate lines and keeps the first occurrence of each, in the original order. The number of duplicates removed is shown next to the result.

Everything runs in your browser. Your list is never sent anywhere or saved.

How duplicates are detected

Two lines are duplicates when they are identical, according to the settings you choose:

  • Match case (on by default): “London” and “london” are two different lines. Untick it to treat them as the same.
  • Ignore spaces at the start and end of lines (on by default): a stray space at the start or end of a line does not make it different.
  • Treat repeated spaces as one: John Smith, with two spaces, matches John Smith.
  • Remove duplicate empty lines too: by default every blank line is kept, to preserve your layout. Tick it to keep just one.

These settings are only used for comparing: the line that is kept is always exactly the one you entered.

How to remove duplicate lines online

  1. Paste your list into the “Your text” box.
  2. Adjust the settings if needed. The result updates straight away.
  3. Check the “Duplicates removed”, “Lines before” and “Lines after” counters.
  4. Copy the list with “Copy result”, or save it with “Download”.

Examples

Default settings

Text entered

apples
pears
apples
cherries
pears

Result

apples
pears
cherries

Two duplicates removed; items stay in the order they first appeared.

Ignoring capital letters

Text entered

London
london
LONDON
Leeds

Match case: off

Result

London
Leeds

All three spellings of London count as the same line; only the first is kept.

Extra spaces

Text entered

John  Smith
John Smith
  John Smith

Treat repeated spaces as one: on

Result

John  Smith

All three lines are treated as identical. The one kept is the first, exactly as entered, with its two spaces.

When to deduplicate a list

  • Cleaning up a list of email addresses or contacts before a mailing.
  • Removing repeats from a list of keywords, product codes or IDs.
  • Merging two lists pasted one after the other, without repetition.

Limits

  • Lines are compared as a whole: a word repeated inside a single line is left alone.
  • Only exact duplicates are found, according to the settings: “Smith John” and “John Smith” stay two different lines.
  • The tool does not sort the list. To put it in order as well, use the line sorter afterwards.

Frequently asked questions

Is my list sent to a server?

No. The processing is done by your browser, on your device. Linotext never receives your list and does not store it anywhere.

Which occurrence is kept?

Always the first one, in its original position. Later copies are removed and the order of the other lines does not change.

How do I remove duplicates and sort at the same time?

Use the line sorter with the “Remove duplicates” box ticked: the list is deduplicated, then sorted.

Are blank lines removed?

Not by default: they are all kept. Tick “Remove duplicate empty lines too” to keep just one.