Remove Duplicate Lines

Strip repeated lines from any block of text. Keeps the first occurrence and drops the rest, with options for case, whitespace, blanks, and sorting.

Frequently asked questions

Which copy of a duplicate line is kept?

The first occurrence is kept and every later duplicate is dropped, so the original order of your unique lines is preserved unless you turn on alphabetical sorting.

Does it treat different capitalization as duplicates?

By default matching ignores case, so "Apple" and "apple" are treated as the same line. Tick the "Case sensitive" option to keep them as distinct lines.

Will it remove blank lines and leading or trailing spaces?

You control both. "Drop blank lines" removes empty lines, and "Trim whitespace before compare" ignores surrounding spaces when deciding if two lines match.

Is my text uploaded anywhere?

No. Everything runs in your browser and nothing you paste is sent to a server.

Related tools