Line Sorter & Deduplicator

Sort lines A–Z, remove duplicates, reverse, shuffle or trim a list.

Runs locallyWorks offlineShare link carries settings, never your data
Send output toWord & Character CounterCase ConverterText TranslatorBuild a workflow from thisOutput stays on this page until you send it.

Frequently asked questions

Are my lists sent to a server?

No. Everything runs locally in your browser using standard web APIs — your text, files and inputs are never uploaded to a server, so the tool works even offline once the page has loaded.

Does it sort numbers naturally?

Yes. Natural (numeric-aware) ordering is used, so 'file2' sorts before 'file10' rather than after it, which is how people expect lists to be ordered. This distinction matters for versioning, file lists, and sequential naming where standard alphabetic sorting would misorder items. Without natural sorting, 'item1' comes before 'item10' which comes before 'item2' — clearly wrong for most use cases. Natural ordering applies the mathematical meaning of numbers so numeric sequences sort correctly even when mixed with text, matching human expectations for logical list order.

Can I remove duplicates and sort at the same time?

Yes. Enable 'Remove duplicates' along with any sort mode; the tool deduplicates first (respecting the case-insensitive option) and then sorts what remains. This is useful for cleaning up mailing lists, removing duplicate tags or keywords, and tidying CSV exports where the same value may appear multiple times. Case-insensitive deduplication treats 'John', 'john', and 'JOHN' as the same entry, keeping only the first occurrence. The combination of deduplication and sorting in one pass saves time when cleaning large datasets.

Pro tips

  • Trim whitespace before deduplicating. A trailing space is invisible and makes an otherwise identical line survive as a separate entry.
  • Decide whether case matters for your data before running it — collapsing case on identifiers can merge two genuinely different records.
  • Sort before deduplicating when you want to eyeball the result; identical entries end up adjacent and the removals are easy to verify.
  • Use natural ordering for anything with numbers in it, or item10 files before item2 and version lists come out nonsensical.
  • Keep the original list until you have checked the count. A dedupe that removed far more than you expected usually means case or whitespace handling was not what you assumed.

About Line Sorter & Deduplicator

Sorts alphabetically or by length, strips duplicates and blank lines, trims stray whitespace, and reverses or shuffles order, with case sensitivity as a toggle. The usual reason to reach for it is a list pasted out of a spreadsheet or a log.

Paste a list and this tool reorders it any way you need: alphabetically A→Z or Z→A, by line length, reversed, or randomly shuffled. In the same pass it can remove duplicate lines, drop empty lines and trim stray whitespace, with an optional case-insensitive mode so 'Apple' and 'apple' are treated as the same entry.

It is the fast way to clean a keyword list, tidy a CSV column, dedupe an email or URL list, or randomise names for a draw. Sorting uses natural ordering, so 'item2' comes before 'item10' rather than after it.

Sorting by raw character codes is not alphabetical order, and the difference shows immediately. Byte order puts every capital letter before every lowercase one, so Zebra lands before apple — correct by code point and wrong by any human expectation. Proper alphabetical ordering is locale-aware, and the right answer genuinely differs by language: Swedish places å, ä and ö after z, while German files them alongside a and o. There is no single universal ordering to fall back on.

Deduplication needs the same care about what counts as identical. Whether entries differing only in case are duplicates depends entirely on the data — for email addresses usually yes, for case-sensitive identifiers usually no. Trailing whitespace is the quieter culprit: two lines that look the same but differ by one invisible space are distinct strings, and both survive a dedupe that would otherwise have caught them.

Common use cases

  • Cleaning an email or subscriber list before an import, where duplicates cost money or trigger a spam complaint.
  • Tidying a keyword list exported from a research tool that arrives with repeats and stray blank lines.
  • Deduplicating URLs collected from a crawl or a spreadsheet column before processing them.
  • Alphabetising a reference list, glossary or set of options so a reader can scan it.
  • Randomising an order for a draw, a rota or a review assignment.
How it comparesSpreadsheets can do all of this through Remove Duplicates and a sort, across several dialogs and a column selection. Command-line sort and uniq are faster still if the data is already in a file and you remember that uniq only collapses adjacent lines. Pasting a list is quicker than either when it came out of an email.