Duplicate Line Remover

Remove duplicate lines from lists with keep-first or keep-last, optional case-insensitive matching, and whitespace trimming.

Files and content are processed locally in your browser and are not uploaded to our server.

About this tool

Deduplicate line-based lists such as emails, URLs, or log entries. Choose whether to keep the first or last occurrence of each duplicate, ignore letter case, and trim whitespace before comparing.

How to use

  1. Keep first or last duplicate occurrence
  2. Optional case-insensitive comparison
  3. Trim whitespace before matching
  4. Show count of removed lines
  5. Import and export text files
  6. Paste lines: Enter one item per line or import a file.
  7. Set rules: Pick keep-first/last, case, and trim options.
  8. Remove duplicates: Click Remove duplicates and copy the unique list.

Examples

Limitations

FAQ

What is the difference between keep first and keep last?
Keep first retains the earliest occurrence of each duplicate line; keep last keeps the final one.
Are empty lines removed?
Empty lines are treated as lines. Enable trim if whitespace-only lines should collapse.
Does it sort the output?
No. Original order is kept except for removed duplicate lines.