utilobox

Remove duplicate lines

Paste a list with one item per line to delete repeated lines, sort it and tidy it up. The result updates instantly, with line counts before and after.

Lines before
0
Lines after
0
Duplicates removed
0
Empty lines removed
0
Duplicates
Clean up
Order
Add to each line

Steps run in this order: trim, remove empty lines, handle duplicates, sort, then prefix, suffix and numbers. Numeric sorting uses the first number found in each line, and lines without a number go last. Nothing is uploaded; the list stays in your browser.

How to use it

  1. Paste your list into the input box, one item per line.
  2. Choose how to treat repeated lines, and tick the trim or empty-line options if you want them.
  3. Pick a sort order, add line numbers, or type text to put before or after every line.
  4. Copy the result, download it as a .txt file, or use it as the new input for another pass.

What it does

  • Three ways to handle duplicates

    Keep the first copy of each line, keep only lines that appear once, or keep only the lines that repeat. Case can be ignored when matching.

  • Many ways to sort

    A to Z, Z to A, natural order, by number, by length, reversed, or a random shuffle you can repeat with one click.

  • Clean up in the same step

    Trim spaces around each line and drop empty lines while you dedupe.

  • Numbers, prefix and suffix

    Number the lines, or wrap each line in text such as quotes, a bullet or a comma for pasting into code.

  • Counts before and after

    See how many lines you started with, how many are left, and how many duplicates and empty lines were removed.

  • Copy, download, chain

    Copy the list, save it as a text file, or send the result back to the input and apply another step.

Good to know

Lists collect repeats quickly: email addresses exported from several sources, keywords copied from different sheets, URLs from a crawl, or log lines. Removing duplicate lines by hand is slow and error-prone, and spreadsheets are overkill for a plain list. Here you paste the list, and the repeated lines are gone straight away, keeping the first occurrence in its original position unless you pick a sort order.

Steps run in a fixed order: trim, remove empty lines, handle duplicates, sort, then prefix, suffix and numbers. That makes results predictable, for example trimming first so that "apple" and "apple " count as the same line. Numeric sort reads the first number in each line, so "item 2" comes before "item 10", and lines without a number go to the end. Matching is exact unless you tick the case option, and everything is processed in your browser, so private lists stay private.

Questions and answers

How do I remove duplicate lines from a list?

Paste the list with one item per line. With "Keep the first of each" selected, repeated lines are removed and the first copy stays in place.

Are "Apple" and "apple" treated as duplicates?

Only if you tick "Ignore upper/lower case". By default the match is exact, so different capitalization counts as different lines.

Why does a line with a trailing space not match its twin?

A trailing space makes the lines different. Tick "Trim spaces around each line" and the two will match.

What is natural sort?

It orders numbers inside text by value, so item2 comes before item10, whereas plain A to Z puts item10 first.

Can I see only the lines that appear more than once?

Yes. Choose "Keep only repeated lines" to list each repeated line once, which is handy for finding what was duplicated.

Is my list uploaded?

No. The processing happens in your browser and the list stays on your device.