Overview
Removes duplicate lines from any list while keeping the first occurrence of each, with options for case sensitivity, whitespace trimming, and re-sorting the result alphabetically in either direction. A counter shows exactly how many lines were removed, and the whole operation runs in your browser.
How It Works
Paste your list into the input box, one item per line. By default the tool trims surrounding whitespace from each line, drops empty lines, and treats lines differing only in case as duplicates; untick either checkbox to change that. Keep order preserves the sequence of first appearances, or choose Sort A-Z / Z-A to alphabetise with locale-aware comparison. The Duplicates removed counter shows the reduction, and the unique lines sit in the output box ready to copy.
Step-by-Step Usage Guide
- Paste the list, one entry per line, into the input area.
- Decide on Trim whitespace and Case-sensitive — the defaults (trim on, case-insensitive) suit most exported data.
- Choose Keep order, Sort A-Z or Sort Z-A.
- Check the Duplicates removed count, then copy the unique output.
Technical Specifications & Standards
Deduplication uses a Set of keys built during a single pass, so the first occurrence wins and later repeats are skipped — no sorting is needed to keep order, and the algorithm is linear in the number of lines. The case-insensitive default works by comparing lowercased keys while still outputting the line as it first appeared, so 'Apple' and 'APPLE' collapse to the first spelling seen. Trim mode is a deliberate two-for-one: it normalises invisible trailing spaces (the classic cause of 'identical' lines that refuse to dedupe, especially in data exported from spreadsheets) and filters out blank lines in the same pass. Sorting uses locale-aware comparison rather than raw code-point ordering, so it respects language collation rules instead of putting every capital before every lowercase letter. Note the exact-match nature of the key: '2 apples' and '2 apple' are different lines, and numbers are compared as text, so 10 sorts before 9 in the A-Z mode.
Targeted Use Cases
- Cleaning an email or user list where the same address appears many times after merging sources.
- Deduplicating keyword lists, URL crawls or log lines where repetition hides the real set.
- Normalising spreadsheet exports whose rows carry stray trailing spaces.
- Reducing a long list to its distinct values before sorting it for a report.
Notes & Gotchas
- Leave Trim on for pasted data; invisible trailing whitespace is the most common reason duplicates survive.
- Turn Case-sensitive on when case is meaningful — file paths, codes and identifiers often are.
- Use Keep order when sequence matters (e.g. a playlist or priority list); sort afterwards only if needed.
- Expect text-order sorting: as strings, 10 sorts before 9. Sort numerically in a spreadsheet after export if that matters.
Frequently Asked Questions
Which occurrence is kept?
The first. The tool scans top to bottom and keeps the earliest appearance of each unique line, so the order of first sightings is preserved in Keep order mode.
Are 'Apple' and 'apple' duplicates?
By default yes — matching is case-insensitive, and the first spelling encountered is the one kept. Tick Case-sensitive to treat different capitalisations as distinct lines.
Why did visually identical lines not deduplicate?
Usually trailing or doubled whitespace. The default Trim option strips leading and trailing spaces and removes empty lines; if you turned it off, re-enable it and run again.
Does the tool sort my list?
Only if you ask. Keep order preserves first-appearance sequence; Sort A-Z and Z-A use locale-aware alphabetical comparison, which handles accents and case more naturally than raw character codes.