Content and text
Remove Duplicate Lines, Sort and Clean a List
Remove duplicates and empty lines, trim spaces and sort a list in one pass.
Runs in your browser; nothing is uploaded. · Free, no account · 1 min
Importing a saved run into your account is coming soon. Until then, your last runs stay in this browser only, and you can download your files.
How to use
- Paste your list with one item per line, or load the example.
- Tick what to clean: trim spaces, remove empty lines, remove duplicates.
- Choose a sort order and, for Arabic lists, set the sorting language to Arabic.
- Check the counts of lines removed, then copy or download the cleaned list.
What it checks and how it works
The steps run in a fixed order: trim and collapse spaces, drop empty lines, remove duplicates (keeping the earliest copy), sort, reverse, then number. Sorting uses Intl.Collator, the browser's language-aware comparison, so accented and Arabic letters sort by the rules of the language you pick. Natural sort treats digit runs as numbers, so item 2 comes before item 10.
Two lines count as duplicates only when they match after the cleaning options you ticked, and sorting rules differ a little between browsers. The tool works on whole lines: it does not look for repeated words inside a line.
Sources
- MDN: Intl.Collator (language-aware sorting) opened 29 Oct 2026
Related tools
Text Diff Checker
Paste two versions of a text and see exactly what was added and removed.
Case Converter
Turn a phrase into any naming or writing case, one line or many at a time.
Regex Find and Replace
Find and replace text with a regular expression, and see every match with its line number.
CSV to JSON Converter
Turn a CSV table into a JSON array of objects, with the delimiter detected for you.
Questions
About this tool
The earliest one. If you also sort, the kept lines are sorted afterwards.
Yes. Case-insensitive comparison is on by default, so Cairo and cairo count as one line, and the kept line keeps its own spelling.
Yes. Set the sorting language to Arabic and the lines follow the Arabic alphabet through the browser's Intl.Collator.
Get started today
Find out where your brand stands in AI. Free.
Run a free AI visibility analysis on your domain. No credit card, results in minutes. See what AI engines say about your brand today.
Brands already measuring their AI visibility with Zaher.


