Remove duplicate lines

Paste a list: every repeated line is removed, the first occurrence is kept and the original order stays the same.

How it works

The tool reads the list top to bottom and remembers each line it has seen. When a line matches one already seen, it is dropped. With "Ignore case" on, Apple and apple count as the same; with "Ignore surrounding spaces" on, cherry matches cherry. The kept line is always the first one, exactly as written.

Example

InputOutput (ignore case + spaces)
apple
banana
Apple
cherry
banana
  cherry
apple
banana
cherry

To also sort the list, run the result through Sort lines.

Frequently asked questions

Does it change the order of my list?
No. Order is preserved; only later repeats are removed.
How many lines can it handle?
Hundreds of thousands of lines; the work runs in your browser using a hash lookup, so it is fast.