Skip to content
HNarzędzia
en
Categories

Remove duplicate lines online - sort and clean up lists

Paste a list - one item per line - and remove duplicates, sort A-Z, number the lines or count occurrences in one click. Everything runs in your browser.

  • Free
  • No sign-up
  • Private
  • Runs locally
Operation
Paste a list to see the result. Each line is one item.

How to do it?

  1. 1.

    Paste your list

    Paste text into the top box with one item (email, name, number) per line. A spreadsheet column works too.

  2. 2.

    Pick an operation

    Click “Remove duplicates” or another operation: sort A-Z or Z-A, sort numerically, reverse, shuffle, trim, number lines, add a prefix/suffix or count occurrences.

  3. 3.

    Set comparison options

    Turn on “Ignore case” and “Ignore spaces” if “John Smith” and “john smith ” should count as the same item; “Skip empty lines” drops blank lines from the result.

  4. 4.

    Copy the result

    See how many lines were removed, then copy, download as .txt, or click “Use as input” to chain the next operation.

How duplicate removal works

The tool keeps the first occurrence of each line and drops later ones, preserving the original order. From “apple, Apple, pear, apple , plum” an exact comparison keeps 4 items, because a different capital letter or a trailing space is different text. With Ignore case and Ignore spaces on, 3 remain: “apple, pear, plum”.

Ignoring spaces trims both ends of each line and treats repeated spaces as one - the most common source of hidden duplicates when copying from spreadsheets and PDFs. The kept line is shown exactly as it was first written; the options only affect the comparison. Statistics above the result show input lines, unique lines, duplicates and empty lines.

Natural and locale-aware sorting

Sorting uses Intl.Collator, so accented letters sort next to their base letters (é next to e) and numbers inside text compare as numbers: “file1, file2, file10” instead of the computer-style “file1, file10, file2”. With “Ignore case” on, “apple” and “Apple” are treated as equal while sorting.

Sort numerically orders lines by the first number found anywhere in the line, e.g. “Item 12.5 kg” → 12.5 and “-3 °C” → −3. Lines without a number go last in their original order. Thousands written with a space (“1 200”) are read as 1200, but a comma is treated as a decimal separator, so “1,200” sorts as 1.2 - remove thousands commas first if your list uses them.

Other operations

OperationWhat it doesExample
Number linesadds “1. ”, “1) ”, a tab or “1 - ”; the start number is configurablemilk → 1. milk
Add prefix/suffixadds text at the start and end of every lineprefix ', suffix ', → 'ab12', for an SQL IN (…) list
Count occurrencesnumber of times each item appears, most frequent first, as “count [tab] line”3 apple, 1 pear
Trim spacesremoves leading/trailing spaces and collapses repeated spaces and tabs“ a b ” → “a b”
Remove empty linesdrops lines that are empty or contain only spaces-
Reverse orderlast line becomes first-
Shufflerandom order (Fisher-Yates); “Shuffle again” re-draws-

Practical examples

  • Mailing list: paste emails from several exports, turn on Ignore case (email addresses are case-insensitive) and Ignore spaces, then Remove duplicates.
  • Survey answers: use Count occurrences to see which answer was given most often, then paste the tab-separated result into a spreadsheet as two columns.
  • Keyword list: Trim spaces → Remove duplicates → Sort A-Z, chaining the steps with “Use as input”.
  • Random order: Shuffle a class list for presentation order, or put the names on the wheel spinner for a live draw.

To compare two versions of a list line by line, use the diff checker; to count characters or words, the character counter.

Frequently asked questions

How do I remove duplicate lines from a list?

+
Paste the list, choose “Remove duplicates” and copy the result. The first occurrence of each line is kept and the counter shows how many duplicates were removed.

Are “Smith” and “smith” duplicates?

+
Not by default, because the case differs. Turn on “Ignore case” to treat them as the same item.

Does the order change?

+
No - removing duplicates preserves the original order. Sort afterwards if you need an ordered list.

How do I remove empty lines?

+
Choose “Remove empty lines”. Lines containing only spaces count as empty too. Alternatively turn on “Skip empty lines” while deduplicating or sorting.

Why does “file10” come after “file9”?

+
Sorting is natural: numbers inside text are compared by value, so file9 < file10, unlike plain character-by-character sorting.

How many lines can I paste?

+
Tens of thousands of lines are fine because processing happens on your device. Hundreds of thousands may slow the browser briefly.

Is my list uploaded anywhere?

+
No. All operations run in your browser.

Updated: