Remove Duplicate Lines

Keep the first copy of each line in a pasted list.

Text inputPreview and copyRuns in your browser

Enter your text

Result

How to use Remove Duplicate Lines

  1. Paste your source text in the input box.
  2. Select Convert to generate the output.
  3. Review the output before copying it.

How it works

Keep the first copy of each line in a pasted list. Read each line in order and keep its first exact occurrence.

Formula or processing rules

Read each line in order and keep its first exact occurrence.

Worked example

Paste apple, banana, and apple on separate lines. The result keeps apple and banana.

Example text lengths in UTF-16 code units
Input · 18
Output · 12
Worked example
MeasureValue
Source textapple banana apple
Resultapple banana

Pros and cons

Pros

Keep the first copy of each line in a pasted list. The sample provides an immediate check of the expected output.

Cons

Lines are case-sensitive and spaces are significant. Trim lines first if accidental spaces should be ignored.

Troubleshooting

Check the input format and compare your case with the built-in sample. Lines are case-sensitive and spaces are significant. Trim lines first if accidental spaces should be ignored.

Frequently asked questions

How do I use the text I get back?

Copy the output into the document, list, or compatible tool where you need it.

How does the transformation work?

Read each line in order and keep its first exact occurrence.

Can I try a sample first?

Paste apple, banana, and apple on separate lines. The result keeps apple and banana.

What should I check before using the result?

Lines are case-sensitive and spaces are significant. Trim lines first if accidental spaces should be ignored.

Is my input stored by the tool?

The transformation is computed in the open page. The tool does not save the submitted text.