Sort lines and clean up lists — right in your browser
Paste your list and pick the operations: sort A–Z or Z–A, remove duplicates, delete empty lines, trim whitespace, reverse the order. Live statistics show lines before/after, and the result copies with one click. Everything runs locally in your browser — no upload, no signup.
In which order does the tool work?
The operations always run in this fixed order, so the result stays predictable:
- Trim — remove whitespace at the start/end of each line
- Remove empty lines
- Sort (A–Z or Z–A)
- Remove duplicates (consecutive only, or entire list)
- Reverse
The order is deliberate: because trimming happens first, apple and apple count as duplicates. And because sorting runs before deduplication, the "consecutive only" mode still catches every repeat whenever sorting is active.
Why "natural" sorting instead of character codes?
A naive sort by character codes gives surprising results: in ASCII, Z is code 90 and a is code 97 — so every uppercase letter sorts before every lowercase one, and file10 comes before file2 because digits are compared one by one. This tool uses Intl.Collator with numeric comparison instead: numbers sort as numbers (file2 before file10), and accented letters land next to their base letters as your language expects, instead of after z. For German lists this matches the dictionary order of DIN 5007-1 (ä sorts like a); the DIN 5007-2 variant for name registries (ä sorts like ae) is not implemented — an honest limitation.
Duplicates: "consecutive only" or "entire list"?
- Consecutive only removes a line when it directly repeats the previous line — the behavior of the Unix classic
uniq, which likewise only detects adjacent repeats. - Entire list removes every repeat wherever it appears; the first occurrence is kept.
With "ignore case" enabled, Berlin and berlin count as the same line — the first spelling encountered is kept. Typical uses: cleaning mailing lists, merging keyword lists, condensing log excerpts, pre-sorting CSV columns.
Does my data stay private?
Yes. Sorting and deduplication run entirely on your device — nothing is sent to a server. That makes even customer lists and address books safe to process; storage happens at most locally in your browser, so your list is still there on your next visit.