ARZENTIQ
DEVELOPER & DATA

Remove Duplicate Lines & Sort

Remove duplicate lines from a list with the rules stated (trim, case, keep first or last), then sort A–Z, Z–A, by length or naturally; removed lines counted.

A clean list with duplicates and blanks gone, sorted the way you choose, plus a count of what was removed and which lines repeated — nothing leaves the browser.

Example: apple / Banana / apple / banana / cherry / cherry → case-insensitive and trimmed leaves apple, Banana, cherry (3 of 6, 3 removed); natural sort puts item2 before item10.

v0.1.0 · last reviewed 19 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Two lines are duplicates
only under a rule you chose.

How lines are compared, which copy survives, what the sort orders mean, and what the counts report.

Comparison

The text is split on line breaks (Windows and Unix alike; a final newline does not add an empty line). Each line is normalised before comparison: trimmed of leading and trailing spaces if trimming is on, lower-cased if case-insensitive is on. Two lines with the same normalised form are duplicates; the first (or, if you choose, the last) occurrence is kept with its original spelling. Empty lines are dropped when "ignore empty" is on. The page says when a rule merged lines that look different, so an "Apple"/"apple" merge is never silent.

Sorting

None keeps input order. A–Z and Z–A use locale-aware comparison (accents and case ordered as a dictionary would). By length orders short to long, ties A–Z. Natural order compares the numbers inside text by value, so item2 comes before item10 and v1.9 before v1.10 — the order file managers use. Sorting happens after deduplication.

Counts and limits

Total is the number of lines read; unique the lines kept; removed the duplicates dropped (empty lines are counted separately). The duplicates table lists every line that occurred more than once and how often. Up to 2 MB of text is processed on this page; nothing is uploaded, and the same four anonymous usage counts as the rest of the site apply.