Remove Duplicate Lines

Strip duplicate lines from text. Useful for cleaning lists, log files, and CSV data.

Input

Output

About this tool

When to Remove Duplicate Lines

Cleaning email lists, deduplicating CSV exports, removing repeated log entries, finding unique URLs from a crawl, or building a unique vocabulary list from text are all common use cases. The tool preserves order by default (keeping the first occurrence) and offers options to sort or to keep the last occurrence instead.

Does case sensitivity matter?

By default, "Apple" and "apple" are different lines. Toggle "Ignore case" to treat them as duplicates.

What is the equivalent shell command?

On Linux/macOS: sort file.txt | uniq removes duplicates after sorting. awk '!seen[$0]++' file.txt preserves order.

Related Tools

More Text Tools

Word CounterLorem IpsumText Diff CheckerFind & ReplaceSort LinesReverse Text

Want more detail? Read How to Use Remove Duplicate Lines Tool: Practical Guide and Best Practices.