About this tool
Remove duplicate lines, keeping the first or last occurrence, see how often each item appears and on which lines, then sort, copy or export TXT/CSV. Ideal for cleaning lists, keywords and order numbers.
Typical uses
- Remove duplicate names from a sign-up list
- Count how often each keyword appears
- Clean repeated order numbers from an export
How to use
Paste text or import a UTF-8 file, one item per line. Optionally ignore edge spaces, case or Unicode composition.
Keep first or last occurrences, choose all or duplicate-only items, and inspect frequencies and source line numbers. Sort, copy or export TXT/CSV.
Up to 1 million characters, 20,000 lines, 4 MB per UTF-8 file and an 8-second worker timeout. Defaults to exact matching, first occurrence and skipped blanks. Matching normalization preserves original text unless output trimming is explicitly enabled. CSV includes frequencies and line numbers with formula protection.
One sample list under different settings
Example fills in six lines: item2, item10, item2, Item3, "␣item3␣" (one space on each side) and item1, followed by a newline. That final newline only ends the last line; it is not a seventh item. Each row below is what Process list really returns (␣ marks a space):
| Settings | Result lines | Merged repeated occurrences |
|---|---|---|
| Defaults | item2 · item10 · Item3 · ␣item3␣ · item1 | 1 |
| Ignore edge whitespace when comparing + Ignore case when comparing | item2 · item10 · Item3 · item1 | 2 |
| Same + Representative item: Last original and position | item10 · item2 · ␣item3␣ · item1 | 2 |
| Same (first kept) + Also trim output lines | item2 · item10 · Item3 · item1 | 2 |
| Output selection: Repeated items only | item2 | 1 |
| Output selection: Items appearing exactly once | item10 · Item3 · ␣item3␣ · item1 | 1 |
- Matching is exact by default, so Item3 and "␣item3␣" are separate items. Only the two item2 lines merge, and Merged repeated occurrences shows 1.
- The two comparison options only change what counts as equal. The output is still the original text: the merged item shows Item3 as written on line 4, not a lowercased or trimmed version.
- Switching Representative item to Last original and position replaces both the text and the position. The output uses "␣item3␣" from the last occurrence, and under Original order item2 moves behind item10 because its position is now line 3. The frequency table still lists every line of the group: 4, 5.
- The text itself is rewritten only when Also trim output lines is ticked.
- Repeated items only and Items appearing exactly once filter on the merged count: more than 1 goes to the first, exactly 1 to the second. Together they cover every distinct item.
What counts as the same line: Unicode, case and blank lines
The "distinct / skipped" figures come from the result summary. ◌́ stands for a separate combining acute accent.
| Input lines | Option ticked | Distinct / skipped | Result ×count |
|---|---|---|---|
| Café · Cafe◌́ | Treat Unicode equivalents as equal (NFC) | 1 / 0 | Café ×2 |
| STRASSE · straße | Ignore case when comparing | 1 / 0 | STRASSE ×2 |
| İstanbul · istanbul | Ignore case when comparing | 2 / 0 | İstanbul ×1 · istanbul ×1 |
| a · ∅ · ␣␣ · a · ∅ | Skip blank lines (default) | 1 / 3 | a ×2 |
| a · ∅ · ␣␣ · a · ∅ | Skip blank lines cleared | 3 / 0 | a ×2 · (blank line) ×2 · ␣␣ ×1 |
- "Café" can be stored as one precomposed é or as e plus a combining accent. They look identical but are different characters. With NFC ticked they merge, and the first original is shown.
- Ignoring case converts to upper case and then to lower case, which behaves like Unicode case folding for most text: STRASSE and straße count as one item. İstanbul and istanbul stay separate, because the dotted capital İ only pairs with i in Turkish, so check Turkish name lists by hand.
- A line holding only spaces or tabs is also blank. By default blank lines join no item and are counted separately in the summary. With skipping cleared, a truly empty line and "␣␣" become two different items, and the empty one is shown as "(blank line)" in the frequency table.
How the sort orders actually line up
Eight lines b, B, a, _x, 10, 9, é, z show the difference. Text ascending (Unicode) compares UTF-16 code units one by one: digits first, capitals before the underscore, lowercase after that, é after z, and 10 before 9. Natural ascending (item2 before item10) uses English collation with numeric comparison: 9 before 10, lowercase before capital of the same letter, and é before z.
| Order | Result |
|---|---|
| Original order | b · B · a · _x · 10 · 9 · é · z |
| Text ascending (Unicode) | 10 · 9 · B · _x · a · b · z · é |
| Natural ascending (item2 before item10) | _x · 9 · 10 · a · b · B · é · z |
Ties always keep the original position, including for Most frequent first. Sorting b, a, b, c, a gives b · a · c: b and a both occur twice, and b comes first because it appeared first. The descending options reverse the comparison only, so ties still follow input order.
Export formats and processing limits
Copying and Download TXT give the result lines joined with the chosen Output line endings (LF or CRLF), with no newline after the last line. Download frequency CSV starts with a UTF-8 BOM, uses CRLF, quotes every cell and always has English headers. Line numbers are separated by "; ", and the B column is always empty in this tool. Text starting with =, +, - or @ gets a leading apostrophe so spreadsheets do not run it as a formula, but plain numbers such as -5 are left alone. This is the export for =1+1, -5 and @x, each appearing twice, with Repeated items only:
| CSV |
|---|
| "Text","Count","A line numbers","B line numbers" |
| "'=1+1","2","1; 2","" |
| "-5","2","3; 4","" |
| "'@x","2","5; 6","" |
The page preview shows the first 20,000 characters. The frequency table shows 100 rows per page and up to 30 line numbers per item, with the rest summarized as "… (+count)". Copy and download always contain the full result. These limits produce the messages shown:
| Limit | Value | Message |
|---|---|---|
| Input characters | 1,000,000 characters | Use at most 1 million characters across the inputs. |
| Lines per input | 20,000 lines (a final newline is not counted) | Each input is limited to 20,000 lines. |
| Imported file | 4,000,000 bytes | Could not read the file, or it exceeds 4 MB. |
| File encoding | UTF-8 with no NUL characters | Import a UTF-8 text file. Binary content is not supported. |
| Background processing | 8 seconds | Processing stopped after 8 seconds. Use smaller inputs. |
Frequently asked questions
Do case and spaces matter?
Matching is exact by default. You can ignore edge spaces, case or Unicode composition without rewriting the original text.
Can I see only the duplicates?
Yes. Output only items that occur more than once, with counts and line numbers.
How many lines are supported?
Up to 1 million characters, 20,000 lines and 4 MB per file.
Suggest an improvement to this tool
Missing an option, something awkward to use, or a wrong result? Let us know.