Remove Duplicate Lines

Remove duplicate lines from text while preserving order.

Input

Examples:

Output

What is removing duplicate lines?

Removing duplicate lines means taking a list or block of text and keeping only one copy of each unique line. The result is a cleaned list with no repeated rows, in the same order as the first occurrence of each line.

Why this tool is useful

Duplicate lines often appear when merging lists, pasting logs, or cleaning data. This tool quickly deduplicates text without changing the order of the first occurrence of each line. Use it to clean up word lists, CSV-like data, URLs, or any multiline content. Optionally trim empty lines to get a tighter result.

Example text cleanup

If you paste lines like: apple, banana, apple, cherry, banana — the output will be: apple, banana, cherry. Order is preserved; only duplicates are removed. The tool works entirely in your browser; nothing is sent to a server.

How to use this tool

Paste or type your multiline text in the input box. The output updates as you type. Use "Trim empty lines" to remove blank lines from the result. Click Copy to copy the deduplicated text, or Clear to start over. For more text tools, try Sort Text Alphabetically or Word Counter.