Tekst · verktøy

Fjern dupliserte linjer

Lim inn ett element per linje. Gjentatte elementer fjernes med ett klikk.

Kjøres i nettleseren. Ingen opplasting.

Your cleaned list will appear here.

Duplicates removed: 0

Om verktøyet

Fjern dupliserte linjer sem complicação.

Nyttig for lister med søkeord, URL-er, navn, ID-er, tagger og kopierte regnearkrader.

Veiledning

Slik bruker du Fjern dupliserte linjer

Remove Duplicate Lines cleans a list that has repeated lines. You paste one item per line, choose a few options, and press the button. The tool keeps the first copy of each line, drops the later copies, and keeps the original order. It also tells you how many duplicates it removed. It works well for keywords, URLs, names, tags and rows copied from a spreadsheet. It does not sort the list or look for lines that are only similar.

Slik gjør du

  1. Paste your list into the box, with one item on each line.
  2. Leave Trim spaces ticked to ignore spaces at the start and end of each line. Tick Ignore case if Apple and apple should count as the same.
  3. Leave Remove empty lines ticked to drop blank lines. Untick it if you want to keep one blank line.
  4. Press Remove duplicates. The clean list appears in the second box, and a counter shows how many duplicates went away.
  5. Press Copy result to copy the clean list, or Clear to empty both boxes.

Eksempler

A simple word list

Du skriver inn
Tekst
apple banana apple cherry banana
Trim mellomrom
ja
Ignorer store/små bokstaver
nei
Fjern tomme linjer
ja
Du får
Liste
apple banana cherry
Duplikater fjernet
2

The second apple and the second banana are repeats, so they go. The blank line at the end is dropped by the empty-line option and is not counted.

Kjørt med verktøyets egen kode.

Same word, different capital letters

Du skriver inn
Tekst
Apple apple APPLE Pear
Trim mellomrom
ja
Ignorer store/små bokstaver
ja
Fjern tomme linjer
ja
Du får
Liste
Apple Pear
Duplikater fjernet
2

With Ignore case on, the three spellings count as one item. The first one, Apple, is the one that stays. With Ignore case off, all four lines would stay.

Kjørt med verktøyets egen kode.

Extra spaces around a line

Du skriver inn
Tekst
red red red red
Trim mellomrom
ja
Ignorer store/små bokstaver
nei
Fjern tomme linjer
ja
Du får
Liste
red
Duplikater fjernet
3

Trim spaces cuts the spaces off before the lines are compared, so all four lines are the same word. With Trim spaces off, only the exact last red matches the first, and the result is red, space red and red space.

Kjørt med verktøyets egen kode.

Spreadsheet rows with tabs

Du skriver inn
Tekst
id1 Anna id2 Ben id1 Anna
Trim mellomrom
ja
Ignorer store/små bokstaver
nei
Fjern tomme linjer
ja
Du får
Liste
id1 Anna id2 Ben
Duplikater fjernet
1

Each row is compared as one whole line, tab included. The repeated id1 Anna row is removed and the first copy stays in place.

Kjørt med verktøyets egen kode.

Når det er nyttig

  • Clean a keyword list before you paste it into an ad or SEO tool.
  • Remove repeated URLs from a list of links you collected over time.
  • Tidy a list of email names, IDs or tags copied from a spreadsheet column.
  • Merge two lists by pasting both, then removing the lines that appear in both.
  • Prepare a clean list of names for a draw or a roll call.

Begrensninger

  • Only lines that match in full count as duplicates. A line that is only a close match, such as a typo, stays.
  • With Trim spaces off, a line with a trailing space is different from the same line without it.
  • The counter shows duplicates removed only. Blank lines dropped by the empty-line option are not counted in it.
  • The tool keeps the first copy and keeps the order. It cannot sort the list or choose which copy to keep.

Tips

  • Turn on Trim spaces and Ignore case for text typed by people, because small differences are common.
  • For spreadsheet data, copy a whole row only if the whole row should match. To match on one column, copy just that column.
  • Look at the result before you paste it back anywhere, because the tool cannot undo the removal in your source.
  • Keep your original list in another place until you have checked the clean one.

Vanlige spørsmål

Sobre Fjern dupliserte linjer.

Does it keep the first or the last copy of a line?

It keeps the first copy and drops the later ones. The kept lines stay in their original order, so the list is never re-sorted.

Does Ignore case change the text I get back?

No. It only changes how lines are compared. The line that stays is shown just as you typed it, so if Apple comes first, you get Apple back.

What does Trim spaces do?

It removes spaces and tabs from the start and end of each line before the check. The cleaned lines in the result are trimmed too, so the output will not have those spaces.

Why does a blank line stay when I untick the empty-line option?

Blank lines are treated like any other line. One blank line is kept as the first copy and the rest are counted as duplicates. Tick the option again to drop them all.

Can I remove duplicates from Excel rows?

Yes. Copy the rows, paste them here and press the button. Each row is compared as a whole line, tabs included. Check the result before you paste it back into the sheet.

Does it find lines that are almost the same?

No. It only finds exact matches after the options you picked. Two lines that differ by a letter, a dash or an accent are treated as different.

Is there a limit on how long the list can be?

The code sets no limit on lines. A very large paste depends on your browser and device, so for huge lists work in smaller parts and check the count.

Is my list uploaded?

No. The lines are compared in your browser and the page does not send them to a server. Pressing Clear empties both boxes.

How is this different from a sort-and-unique command?

A sort-and-unique command puts lines in order. This tool leaves the order as it is and removes only the later repeats, which is better when the order matters.

Hvordan bruker du Fjerner dupliserte linjer?

Lim inn ett element per linje. Gjentatte elementer fjernes med ett klikk.

Lastes dataene mine opp til en server?

Nei. Behandlingen skjer i nettleseren din, og opplysningene dine lastes ikke opp.