At One Place

Remove duplicate lines

Strip repeated lines from a list, keeping the first occurrence of each.

How it works

Paste a list and get it back with repeats removed. The first occurrence of each line is kept in its original position, so the order you had is preserved rather than sorted away.

Two options change what counts as a duplicate. Ignoring case treats "Apple" and "apple" as the same line. Trimming whitespace first means a line with a trailing space matches one without — which is the usual reason two lines that look identical are not, and the single most common source of confusion with this kind of tool.

Nothing is uploaded. The whole operation happens in your browser, so it is safe to paste a list you would not send to a server.

This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected.

Common questions

Does this keep the original order?
Yes. The first occurrence of each line stays where it was; only later repeats are removed.
Why are two identical-looking lines not being merged?
Almost always trailing whitespace or a different case. Turn on trim and ignore case and they will match.

Related pages