Sort Lines

Sort a list of lines alphabetically, by length or numerically, in either direction, with optional case-sensitivity, trimming and duplicate removal. Runs entirely in your browser.

0 lines

How it works

Lines are sorted alphabetically, by length, or numerically (using the first number found on each line). Reverse simply flips the current order. Sorting is case-insensitive by default; tick the box to make capitals matter. You can also trim spaces and drop duplicate lines in one pass.

Your list stays in your browser, nothing is uploaded.

What this does

This tool sorts a list of lines alphabetically, by length or numerically, in either direction, with optional trimming and duplicate removal.

How to use it

  1. Paste your list.
  2. Choose a sort type and direction.
  3. Toggle case-sensitivity, trim or de-dupe.
  4. Copy the sorted list.

How it works

Numeric sorting reads the first number on each line, so “item 2” comes before “item 10”. Alphabetical and length sorts can run case-sensitively or not, and duplicates can be dropped in the same pass.

Understanding your result

Sorting only reorders lines, it never changes their content, so a surprising order usually means the mode does not match your data: numeric sort reads the first number on each line (item 2 beats item 10), while alphabetical sort treats digits as characters (10 comes before 2). Watch the case-sensitivity toggle, and remember that trimming or duplicate removal, if enabled, also changes the line count, not just the order.

Example

Sorting “10, 2, 1” numerically gives 1, 2, 10 instead of 1, 10, 2.

Sources & methodology

Last updated .

Frequently asked questions

How does numeric sorting work?

It reads the first number found on each line and orders the lines by that value, so “item 2” comes before “item 10”.

Can I sort and de-duplicate at once?

Yes. Tick “Remove duplicates” to drop repeated lines in the same pass as the sort.

Is my list uploaded?

No. Sorting happens locally in your browser; your list is never sent anywhere.