T-47 · Text tools

Sort Lines

Sort lines A–Z, Z–A, naturally (item 2 before item 10), by length or number, shuffle or reverse them. Remove duplicates and empty lines too.

  • Runs in your browser
  • Nothing uploaded
  • No account
Instrument T-47 · Sort LinesLocal

7 lines in · 7 lines out

About this instrument

What it does

Paste a list with one item per line and sort it the way you need: alphabetically in either direction, naturally so that numbers inside the text are compared as numbers, by line length, by the first number on each line, in reverse order, or shuffled at random. Options let you ignore case, trim spaces, drop empty lines and remove duplicates in the same step.

How to use it

  1. Paste your lines.
  2. Pick a sort order and any clean-up options.
  3. Copy or download the sorted list.

FAQ

Common questions.

01What is natural sort order?

Natural sorting compares runs of digits as numbers, so “item 2” comes before “item 10”. Plain alphabetical sorting compares character by character and puts “item 10” first.

02Does removing duplicates respect case?

It follows the “Ignore case” option: with it on, “Apple” and “apple” count as the same line and the first one is kept.

03Is the order of equal lines preserved?

Yes. The sort is stable, so lines that compare as equal, for example lines of the same length, stay in their original order.