Remove Duplicate Lines

Paste a list and every line that has already turned up once is taken out of it.

FluffyShield Protected workspace
FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

Free · No upload · No sign-up · No usage quotas

Will your list keep its gaps when the repeats go?

Only the first one. To this tool an empty line is a line like any other, so every gap after the first counts as a repeat.

What happens to each line
  1. Read the list from the top, one line at a time
  2. Keep a line the first time it turns up
  3. Leave it out every time after that

What it does

Order kept

Nothing is sorted. The lines that stay are in the order you pasted them.

Capitals count

Milk and milk are two different lines here, and both stay.

Look-alikes stay

café can be typed as four characters or as five, with the accent as a character of its own. Both look the same, and both stay.

Limits One list at a time, with no setting that skips blank lines.

A shopping list with a gap between shops

Say you keep your shopping in a note on your phone, sorted by where you'll buy it: the bakery first, then the market, then the chemist, with an empty line after each group so it's easy to read in the aisle. Over the week, milk has crept in twice.

You paste the list here to clear out the second milk, and it goes. So does the gap before Chemist.

Your listWhat comes backBakerybreadmilk(blank line)Marketmilkapples(blank line)ChemistplastersBakerybreadmilk(blank line)MarketapplesChemistplasters

Before and after

The struck lines are the two the tool had already met higher up. Ten lines went in and eight came back. How we checked

Why an empty line counts as a repeat

Think of someone at a door with a guest list, ticking names off as people arrive. The first Sam goes in. A second Sam is turned away, because that name is already ticked.

The tool does the same with your lines, from the top down. It looks at the whole line, every character of it, and asks only whether it has seen exactly that before. An empty line is a guest with no name at all. The first one gets in, and every empty line after it matches it perfectly, so it's turned away as a repeat.

The same rule decides which milk you keep. The tool always keeps the first copy, so milk stays with the bakery and leaves the market group. If you'd rather buy it at the market, move that line up before you paste.

Clearing the repeats from your own list

The repeats go as soon as the list is in, gaps included, so there's nothing to choose first.

  1. Paste your list into the Lines box, blank lines and all.

  2. Your list comes back in the Unique lines box. On a phone, that box sits behind the Result tab.

    The top of the Unique lines box, under Copy and Download: Bakery, bread, milk, one blank line, then Market.
    The top of the Unique lines box, under Copy and Download: Bakery, bread, milk, one blank line, then Market.
  3. Press Copy to take the shorter list with you.

Getting the gaps back

For a short list, the quickest fix is to paste the result and press Enter in front of each group that lost its gap. In ours that's only Chemist, since the first gap, before Market, was kept.

A long list is easier the other way round: paste one group at a time, without its blank line, and put the groups back together afterwards. The catch is that a line repeated in two groups then stays in both, because the tool only ever sees one group.

The shortened list should be in A-to-Z order too

Sort Lines Alphabetically

Paste the result there. With the repeats already gone, only the order is left to fix.

You'd rather do both in one go

Text cleaner

Under To, Unique + sorted takes out the repeats and sorts what's left.

You want to see which lines were taken out

Text diff

Put your list on one side and the result on the other, and it shows each line that's missing.

Search FluffyBench