My Tools Garage

Sort Lines

Alphabetical or numeric line sorting, with dedupe.

in-browser
Sorted output

How to use

  1. 1 Paste your list, one item per line.
  2. 2 Pick ascending or descending order.
  3. 3 Toggle numeric, case-sensitive, dedupe or trim as needed.
  4. 4 Copy the sorted result.

About Sort Lines

Sort Lines reorders the lines of any block of text alphabetically or numerically.

Choose ascending or descending order, switch between case-sensitive and case-insensitive comparison, and turn on natural numeric sorting so that 2 comes before 10 instead of after it.

You can de-duplicate as you sort, keeping only the first occurrence of each line, and trim leading or trailing whitespace from every line before comparing.

This is the kind of small chore that crops up everywhere: tidying a list of names, ordering import statements, cleaning a column pasted out of a spreadsheet, or alphabetising a glossary.

Doing it by hand is tedious and error-prone, and pasting sensitive lists into a random website is a privacy risk.

Here the sort runs entirely in your browser using the Unicode-aware Intl collator, so accented characters order correctly and nothing you paste ever leaves your machine.

The result updates the moment you change an option, so you can experiment with numeric versus alphabetical ordering or toggle de-duplication and instantly see how the list changes before copying it back out.

FAQ

Why does numeric mode matter?

Without it, lines sort as text so "10" comes before "2". Numeric mode compares the numbers, giving a natural 1, 2, 10 order.

Can it remove duplicates too?

Yes — enable "Remove duplicates" to keep only the first occurrence of each line as it sorts.