Skip to content

Remove Duplicate Lines

Delete repeated lines from a list, keeping the first occurrence and the original order.

“Apple” and “apple” are different lines

Ignore spaces at the start and end of lines

Runs in your browser — nothing you enter is sent to a server.

How the Remove Duplicate Lines works

Paste a list with one item per line. Every line that already appeared earlier is removed; the first occurrence stays where it was, so the order of your list doesn't change. The summary shows how many duplicates were removed.

By default, lines are compared exactly (case-sensitive) after ignoring spaces at the start and end. Empty lines are kept as they are, because they usually separate groups; tick Remove empty lines to drop them.

Examples

Case-insensitive

With Case-sensitive off, Apple, apple, APPLE becomes Apple — the first spelling is kept.

Frequently asked questions

Can I also sort the list?

Yes — use the Text Sorter, which can remove duplicates while sorting. This tool keeps your original order.

Is there a size limit?

Only your device's memory. Lists with hundreds of thousands of lines work, because duplicates are found with a hash set in a single pass, and nothing is uploaded.

Why wasn't a line that looks the same removed?

It probably differs in a way you can't see, such as a non-breaking space or a different dash. Run it through the Whitespace Cleaner first, or turn off Case-sensitive if only the capitals differ.

Text Sorter

Sort lines alphabetically, in reverse, by length or with numbers in natural order.

Text Tools

Whitespace Cleaner

Remove extra spaces, tabs and blank lines, fix non-breaking spaces and join broken lines from PDFs.

Text Tools

Text Difference Checker

Compare two texts and highlight what was added, removed or changed, line by line or word by word.

Text Tools

Also in Tools for Writers.