Sort & Remove Duplicate Lines

Remove duplicate lines and sort text A→Z or Z→A — trim and case options included.

Share:

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

  1. Paste your list into the Input box — Windows, Mac, and Unix line endings are all normalised.
  2. Leave Trim lines ticked to strip stray leading and trailing spaces, and tick Case-insensitive dedupe if Alpha and alpha should count as the same row.
  3. Click Remove duplicates, Sort A→Z, or Sort Z→A.
  4. 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.

Frequently Asked Questions

Which duplicate is kept?

The first occurrence of each line is kept; later repeats are removed.

Does case-insensitive dedupe change my text?

No. It only uses case when deciding duplicates; the first original spelling is preserved.

Are Windows and Mac line endings supported?

Yes. The tool normalises \r\n and \r to lines, then joins output with standard newlines.

Is my text uploaded?

No. Sorting and deduplication run entirely in your browser.

Is this tool free?

Yes, completely free with no registration required.

SR Infobiz services

Need something built or looked after?

We build websites, run them in the cloud, and add AI chatbots and automation. See what we offer, or tell us what you need.

You may also like

From the blog

All articles →

Mercury 3 and Nemotron 3.5: Fast, Cheap AI Models Explained

Inception's Mercury 3 writes text by diffusion at 1,000+ tokens a second, and Nvidia's Nemotron 3.5 is open-weight and runs on your own PC. Here is what each do...

GPT-6 Astra: What Actually Changed

OpenAI's GPT-6 Astra is not just a bigger chat model. Here is what actually changed for computer use, coding, cyber risk, pricing, and whether your team should...

Best AI News of August 2026

A short briefing on the AI stories that actually moved in August 2026 — the chip pileup, the trillion-dollar cheques, the jailbreaks, and what they mean if you...