schwapps.
← All toolsText / 04

Remove Duplicate Lines Online — Keep Original Order

Remove duplicate lines while keeping the first occurrence and original order. Choose case-sensitive or case-insensitive matching. Free, no signup, runs locally.

Loading the tool… JavaScript is required for processing on your device. The instructions and examples below are available without JavaScript.

How to use it

Paste one item per line to keep the first occurrence of each distinct line.

Good to know

Case-sensitive matching treats Apple and apple as different entries.

Remove duplicates without sorting your list

Paste one item per line and run the tool. The first occurrence stays in place; later matches are removed. Your remaining lines keep their original order.

Before

pear
apple
pear
orange
apple

After

pear
apple
orange

Should Apple and apple count as duplicates?

By default, Match case exactly is checked: Apple and apple are different lines. Uncheck it for case-insensitive matching. The first spelling is kept: Apple → apple → APPLE on three lines becomes a single Apple.

What stays unchanged?

Spaces are not trimmed, so a line with a trailing space differs from the same text without it. Repeated empty lines become one empty line. The tool compares complete lines, not individual words or selected spreadsheet columns.

For a spreadsheet list, copy a single column and keep a backup before pasting the result back. Do not use this as a CSV-record deduplicator: a quoted CSV field can span multiple lines. To alphabetize the result, use the line sorter afterward.

Limits and privacy

Use at most 100,000 characters and 10,000 lines per run. Processing happens in your browser; tool inputs are not uploaded by Schwapps. Copy or download the result when you are ready.