Sort / Dedupe Lines

How do I sort lines of text?

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

This tool takes a block of text and does one of two things with its lines: sorts them in ascending (A→Z) or descending (Z→A) order, or removes duplicate lines and returns what is left in ascending order. The sort treats A–Z and a–z as equivalent and reads digit runs as numbers, so item9 comes before item10; everything else is compared by character code, which puts accented letters after the unaccented ones rather than where your language would. The duplicate test is stricter: repeats have to match exactly, so a difference in case counts as two lines and both are kept. Either way the tool works line by line on the text itself, not on what the content means — a simple operation, but slow and error-prone to do by hand across more than a handful of lines.

It is used by anyone maintaining lists in plain text — ordering a name list, a set of tags or keywords, or a spreadsheet column pasted as text — and by developers and writers cleaning up data such as a list of URLs, log lines, email addresses or CSV values where duplicate entries have crept in from repeated exports or merges. Removing duplicates before importing a list into a spreadsheet, database or mailing tool avoids double-counting or sending something twice.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators