Remove Duplicate Lines
Clean a list live, choose exactly what counts as the same line, and keep the result on your device.
- Runs in your browser — files never leave your device
- Fewer clicks, keyboard friendly
- Features others lock behind paywalls
- More accurate results
Keep occurrence
Copy shortcut Ctrl/⌘ + Enter
How to use
- Paste one item per line into the input box.
- Choose whether to keep the first or last matching occurrence.
- Turn on whitespace, case, empty-line, or Unicode matching options when needed.
- Leave the order intact or choose a natural A–Z or Z–A sort.
- Review the live result and copy it when it is ready.
What counts as the same line?
By default, two lines match only when every character is the same, and the first copy stays in its original position. “Apple”, “apple”, and “apple ” are therefore three different lines. Turn off case-sensitive matching to merge capitalization differences, or turn on surrounding-whitespace matching when copied lists contain accidental spaces or tabs. These options affect comparison only: the retained line keeps its original capitalization and whitespace so the result does not silently rewrite your data.
The Unicode option compares text after NFC normalization. It catches visually identical text that may be stored differently, such as a Korean syllable pasted as separate jamo characters on one device and as one composed character on another. It is not fuzzy matching: different words, punctuation, and internal spaces remain different.
Keep order, keep the latest, or sort naturally
Keep First is safest for lists whose early order matters: it removes later repeats without moving the surviving line. Keep Last is useful for pasted exports where the most recent copy should win; the surviving line remains at its last original position. Choose Original order to preserve that position, or sort the already de-duplicated result afterward.
Natural sorting compares number runs as numbers, so “item 2” comes before “item 10” rather than after it. Sorting does not decide which duplicate survives—the keep rule does that first. The counters always describe the current options, including any removed blank lines, so there is no separate run button or stale result to interpret.
Line endings and privacy
The remover recognizes Windows CRLF, Unix and current macOS LF, classic Mac CR, and Unicode line and paragraph separators as line boundaries. A pasted trailing line break counts as one final empty line; enable Remove empty lines to exclude it along with blank and whitespace-only lines. This is a line tool, so a CSV row or a sentence with commas is still compared as one complete line.
Processing and the optional saved draft stay in this browser. The page does not upload the text for comparison. Use Clear to remove the saved input from this tool, then copy the cleaned list into a spreadsheet, editor, terminal, or import form.
Frequently asked questions
Does removing duplicate lines keep the original order?
Yes. With Keep First and Original order selected, the first occurrence of each matching line stays where it appeared and later copies are removed. Keep Last retains each final occurrence at its original final position instead.
Can “Apple” and “apple” be treated as duplicates?
Yes. Turn off Case-sensitive matching to compare uppercase and lowercase forms together. The surviving line keeps the capitalization of the first or last occurrence selected by the keep rule.
Will ignoring whitespace trim my output?
No. Ignore surrounding whitespace changes only the comparison key, so “ apple ” can match “apple” without altering the spacing of the line that remains in the output.
Why are visually identical Korean lines sometimes duplicates?
Korean text can be stored either as a composed syllable or as separate jamo characters. Match equivalent Unicode text applies NFC normalization before comparison, so those two encodings match while the retained output keeps the original characters.
Is my list uploaded or stored on a server?
No. De-duplication runs in the browser and the list is not uploaded for processing. The optional draft survives refreshes only through local browser storage; Clear removes that saved input from this tool.
Related tools
Updated 2026-10-12