Remove Duplicate Lines

Remove repeated lines while keeping the first occurrence and original order, with optional case-insensitive matching.

Loading Remove Duplicate Lines...

Practical guide

Keep the original list order

The tool scans from top to bottom and keeps the first version it sees. Later matches are removed without sorting the remaining lines.

Choose exact or case-insensitive matching

Case sensitive is on by default. Turn it off when entries such as Apple and apple should count as the same line; the spelling and capitalization of the first one are preserved.

Understand spaces and blank lines

Remove empty lines is on by default and also removes lines containing only whitespace. Spaces on non-empty lines are preserved and participate in duplicate matching.

How to use

Paste one item per line. Leave Case sensitive on for exact matching, or turn it off to treat simple uppercase and lowercase variants as duplicates. Remove empty lines is on by default. Click Remove Duplicates; the first matching line stays in its original position.

Example

Input
Apple orange apple orange
Output
Apple orange (with Case sensitive off)

Limitations

Lines are not trimmed, so leading or trailing spaces make otherwise identical lines different. Case-insensitive matching uses JavaScript lowercase comparison, not language-specific case folding; for example, ß and SS remain distinct.

Frequently Asked Questions

Does removing duplicates change the order?

No. The first occurrence stays where it was, and later matching lines are removed.

Can I ignore uppercase and lowercase differences?

Yes. Turn off Case sensitive to compare lines with JavaScript lowercase matching.

Are spaces at the start or end ignored?

No. Lines are not trimmed, so extra leading or trailing spaces can make them distinct.

Does it remove empty lines?

Yes. Remove empty lines is enabled by default, and you can turn it off to retain blank lines.