UTILS.
Private by default
≣r

Duplicate Row Remover

Remove duplicate lines while preserving the original order.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
output

About this tool

Strip duplicate rows or lines from text while keeping the first occurrence in order, all in your browser.

The tool compares whole lines, not columns. All common line endings count as a line break. The first copy of each line stays in place, so the original order is kept and nothing is sorted.

Three switches change the comparison. Trim whitespace strips both ends of each line, and the trimmed text is what is output. Ignore case compares lowercased text but keeps the first line's casing, so Apple after apple is removed. Drop empty lines removes blank lines (spaces only counts as blank) without counting them as removed; with it off, only the first blank line survives. A note reports the duplicates removed.

Frequently asked questions

Is order preserved?
Yes. The first occurrence of each line is kept in its original position and later duplicates are removed.
What do the options do?
Trim removes surrounding spaces before comparing, ignore case treats different casings as equal, and drop empty discards blank lines.
Are lines that differ only by trailing spaces duplicates?
Only when trim whitespace is on. Otherwise "apple" and "apple " are different and both are kept.
Can it compare just one CSV column?
No. It compares entire lines, so rows sharing one value but differing elsewhere are both kept.

More tools