Boneyard Tools

Remove Duplicate Lines From Text

Paste a list to strip out duplicate lines while keeping the first of each in its original order. Choose whether matching is case-sensitive and whether surrounding spaces are ignored.

How to remove duplicate lines

  1. Paste your list or text into the box.
  2. Pick whether matching is case-sensitive and whether to ignore extra spaces.
  3. Copy the de-duplicated result.

Examples

Dedupe a list, keeping order

apple
banana
apple
cherry
banana
apple
banana
cherry

Frequently asked questions

Does it keep the original order?

Yes. The first time a line appears it is kept in place, and later duplicates are dropped, so the order you pasted is preserved.

Is the comparison case-sensitive?

By default yes, so 'Apple' and 'apple' are treated as different lines. Turn off case sensitivity to treat them as the same.

What about leading or trailing spaces?

By default surrounding whitespace is ignored when comparing, so ' item' and 'item' count as duplicates. You can turn trimming off to keep them distinct.

How are blank lines handled?

Repeated blank lines are collapsed to one by default. Enable 'keep blank lines' to leave every empty line exactly where it is.

Is my text private?

Yes. Everything runs in your browser and nothing is uploaded to a server.

Related tools