Remove Duplicate Lines

Strip repeated lines from a list, keeping the first occurrence of each.

Paste a list to deduplicate it.


0Lines in
0Lines out
0Removed
Result will appear here.

Features

  • Preserves original order by default
  • Case-insensitive and whitespace-trimming modes
  • Keep the first or last occurrence, or drop duplicates entirely
  • Optional alphabetical or length sorting
  • Reports exactly how many lines were removed

How to use it

  1. Paste your list, one item per line.
  2. Choose how strictly lines should be matched.
  3. Decide which occurrence to keep.
  4. Copy the deduplicated list or download it.

Choosing the right matching rules

Exact matching is the safest default but often misses what you meant. Trailing spaces are invisible and extremely common in lists pasted from spreadsheets or terminal output, so apple and apple  look identical while comparing as different strings. Leaving the trim option on catches those.

Case sensitivity depends entirely on your data. Email addresses are case-insensitive in the domain part and effectively so in practice, meaning User@Example.com and user@example.com reach the same inbox. Passwords, file paths on Linux, and most identifiers are case-sensitive, so folding case there would destroy meaning.

The third option deserves explanation. Keep the first occurrence and keep the last both leave you with one copy of every line. Remove all duplicated lines entirely does something different: it keeps only lines that appeared exactly once, discarding every line that was ever repeated. That is what you want when you are looking for the items unique to a list rather than a tidy version of it.

Frequently asked questions

Yes, completely. Remove Duplicate Lines is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Remove Duplicate Lines covers preserves original order by default, case-insensitive and whitespace-trimming modes, keep the first or last occurrence, or drop duplicates entirely, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
Exact matching is the safest default but often misses what you meant. Trailing spaces are invisible and extremely common in lists pasted from spreadsheets or terminal output, so apple and apple  look identical while comparing as different strings. Leaving the trim option on catches those.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

📖 How to Remove Duplicate Lines from a List Instantly

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.