REMOVE DUPLICATE LINES

Paste text and strip out repeated lines, keeping the order intact. Nothing leaves your browser.

Before: 7After: 5Removed: 2

How to remove duplicate lines

  1. 1

    Paste or type your text into the input box.

  2. 2

    Choose case sensitivity, whitespace trimming, and whether to keep the first or last occurrence of each line.

  3. 3

    Copy the deduplicated result from the output box — it updates live as you type or change options.

Questions

How are duplicate lines detected?
The tool splits your text into lines and compares them for equality. With case sensitivity off, "Apple" and "apple" are treated as the same line. With trim whitespace on, leading and trailing spaces are ignored before comparing.
What's the difference between keep first and keep last?
Keep first keeps the earliest occurrence of each unique line and drops later repeats. Keep last does the opposite — it drops earlier repeats and keeps the final occurrence, which is useful when a later line is the most up to date version.
Does this preserve line order?
Yes. The output keeps lines in their original relative order — it only removes the duplicate occurrences, it doesn't sort or reorder anything.
Is my text uploaded anywhere?
No. Everything runs locally in your browser with JavaScript — your text is never sent to a server.