Line Sorter

Sorted result

About Line Sorter

Paste a list and sort it alphabetically, by line length, or by the number in each line — with optional dedup and blank-line removal in the same pass.

A list rarely arrives already sorted the way you need it — alphabetical for a name list, shortest-first for a set of tags, or by an embedded number for anything labeled "Item 3", "Row 12", and so on. This sorts a pasted list any of those ways without needing a spreadsheet.

Numeric sorting reads the first number found anywhere in each line, not just a line that's purely digits — "Item 20" sorts using 20, so a naturally-labeled list sorts the way you'd expect instead of alphabetically, where "Item 100" would wrongly come before "Item 20".

Removing duplicates and removing blank lines are both optional and applied before sorting, so a list that needs cleaning up and reordering at the same time only takes one pass instead of two separate tools.

What you can use it for

  • Alphabetize a list of names, tags, or categories.
  • Sort a list of files or items labeled with numbers, like "Chapter 3", "Chapter 12".
  • Sort a set of short labels by length before laying them out in a UI.
  • Deduplicate and sort a list pasted from two different sources in one step.
  • Strip blank lines out of a list while sorting it.

How it works, step by step

  1. 1

    Paste your list

    One item per line.

  2. 2

    Choose a sort order

    Alphabetical, reverse alphabetical, by length, or by number.

  3. 3

    Optionally clean it up

    Remove duplicates or blank lines in the same pass.

  4. 4

    Copy the sorted result

    Updates live as you change the options.

Frequently asked questions

How does numeric sort handle a line with no number?

It sorts after every line that does have a number, rather than being treated as zero or landing at the top.

Does numeric sort require the number to be at the start of the line?

No — it uses the first number found anywhere in the line, so "Item 20" sorts by 20.

Is sorting case-sensitive?

By default, yes — uppercase letters sort before lowercase, matching how most programming languages sort strings. Turn on "Ignore case" for a more natural alphabetical order.

Is my list uploaded anywhere?

No. Sorting happens entirely in your browser.