Runs 100% in your browser — nothing uploaded

Remove Duplicate Lines, Sort & Clean Text

Dedupe a list, sort it alphabetically or numerically, trim whitespace, drop empty lines and reverse the order — combine any of these and see the result live, entirely in your browser.

Input lines
Output
Ready — cleaning happens locally, nothing uploaded.

How to remove duplicate lines and sort text

Paste a list — one item per line — into the input box and the cleaned result appears instantly on the right. Tick the operations you want: remove duplicates is on by default, and you can add trim, remove empty lines, a sort order, and reverse. The line counters show how many lines went in, how many came out, and how many were removed, so you can see the effect at a glance. When you are happy, copy the output or download it as a .txt file. It is built for the everyday chore of tidying an email list, a list of IDs, log lines, CSV columns or any newline-separated data.

How deduplication works

Removing duplicates keeps the first occurrence of each line and discards every later copy. With sorting turned off, the surviving lines stay in their original order — important when sequence matters, such as a prioritised list. Turn on ignore case and lines that differ only in capitalisation are treated as identical, so Apple and apple collapse to one entry (the first one seen). Combine it with trim to also treat cherry and " cherry " as the same line, which catches duplicates that only differ by stray leading or trailing spaces — a very common source of "invisible" duplicates in pasted data.

Sorting options

Four sort modes cover the usual needs. A → Z and Z → A sort the lines as text using a locale-aware comparison, so accented characters and mixed case order sensibly. Numeric ↑ and Numeric ↓ read the leading number on each line and order by value, which is what you want for a list of figures — a plain text sort would otherwise place "10" before "9" because it compares character by character. Leave sort on None to preserve input order, which pairs naturally with deduplication when you only want to remove repeats without reshuffling.

The order operations are applied

Because you can combine options, the order they run in matters, and this tool fixes it so the result is always predictable: trim first, then remove empty lines, then remove duplicates, then sort, and finally reverse. That sequence is deliberate — trimming before deduplication means whitespace-only differences are normalised before duplicates are detected, and reversing last means it flips whatever the sort produced. Knowing the pipeline lets you predict the output for any combination of switches.

Why clean lists locally

Tidying a list is pure, deterministic text processing, so a real tool beats pasting the list into an AI assistant — which can silently drop or merge lines on a long input and present the result as complete. This tool applies the exact pipeline every time. It also runs entirely in your browser, so it is instant, works offline, and your data stays private: email lists, customer IDs and internal logs are exactly the kind of thing that should not be uploaded, and here it never is.

Frequently asked questions

Does removing duplicates keep the original order?
Yes — with sorting off, the first occurrence of each line stays in place and later copies are dropped.
Can it ignore case when finding duplicates?
Yes — turn on "ignore case" and Apple and apple count as the same line.
In what order are operations applied?
Trim, then remove empty, then dedupe, then sort, then reverse — a fixed, predictable pipeline.
Is my text uploaded?
No. All processing runs locally in your browser, safe for large or sensitive lists.

Related tools