Skip to content
Jellykit

Remove Duplicate Lines

Keep the first occurrence of every line and drop the repeats, with options to ignore case and spacing.

  • Runs on your device
Loading tool

About Remove Duplicate Lines

Merged mailing lists, log extracts and keyword exports often repeat the same entry many times. This keeps each line the first time it appears, removes every later copy, and reports how many it took out. The order of what remains is unchanged.

Comparisons are exact by default. Switch on "Ignore case" to treat Apple and apple as one, or "Ignore spacing when comparing" to match lines that differ only in spaces.

How it works

  1. The text is split into lines at any kind of line break, and the ending used in the input is used again in the output.
  2. Clean-ups run in this order: non-printing characters, trimming, collapsing spaces, empty lines, duplicates, and finally the line order.
  3. Duplicates are compared after the earlier steps, keeping the first occurrence. Accented letters typed in different ways count as the same.
  4. Sorting uses your browser language rules, so accented letters sort next to their base letter. Shuffling uses the browser secure random generator.

Questions

Which copy is kept?

The first one, exactly as it was written. Later copies are removed even when they differ only in case or spacing and those options are on.

Do I have to sort the list first?

No. Repeats are found anywhere in the text, not only next to each other, and the original order is kept. Choose a line order if you also want the result sorted.

Are accented letters typed in different ways the same?

Yes. An é typed as one character and one typed as e plus an accent mark look the same and are treated as the same line.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.