Sort lines alphabetically and remove duplicate lines online
Paste a messy list and clean it in a single click. This free tool removes duplicate lines while keeping the first occurrence of each, sorts lines alphabetically A to Z or Z to A, and reports a before-and-after line count so you can see how many rows were dropped.
How to deduplicate or sort a list
- Paste your list into the Input box — Windows, Mac, and Unix line endings are all normalised.
- Leave Trim lines ticked to strip stray leading and trailing spaces, and tick Case-insensitive dedupe if
Alphaandalphashould count as the same row. - Click Remove duplicates, Sort A→Z, or Sort Z→A.
- Read the result in the Output box, then press Copy — or Clear to start over.
Lists worth cleaning up
- Email and phone lists — drop repeated contacts before a bulk import.
- Product SKUs — turn an export into a unique, sorted master list.
- Server logs — reduce a noisy dump to distinct error messages for triage.
- Keywords and tags — deduplicate research exports and alphabetise them.
- Spreadsheet columns — tidy a copied column without a formula.
How duplicates and sort order are decided
Deduplication walks the list top to bottom and keeps the first version of each line, so what survives stays in its original order. Case-insensitive mode only changes how matches are spotted — the spelling you pasted is never rewritten in the output. Sorting uses your browser's locale-aware comparison, so accented and mixed-case entries land where a reader expects rather than at the end, as a raw byte sort would.
Your text stays in your browser
Nothing is uploaded: every line is processed locally in JavaScript, so customer lists and internal logs stay private. Need a word or character count on the result? Use the word counter. To fix capitalisation, try the case converter.
Need a custom tool or internal utility built for your team? Get in touch with SR Infobiz.