Skip to content

Sort lines of text

Paste a list and sort it alphabetically, reverse it, or order lines by length. Numbers inside lines are compared naturally, so item 2 comes before item 10.

Your text is processed in your browser as you type. It is not sent to ToolsNest servers or stored after you leave the page.

How to use the Line Sorter

  1. 1Paste one item per line.
  2. 2Choose a sort order.
  3. 3Copy the sorted list.

Supported formats and limits

  • Alphabetical sorting ignores letter case and sorts numbers naturally (2 before 10).
  • Length sorting orders by line length, shortest or longest first.
  • Reverse flips the current order without sorting.
  • Empty lines are kept in place.

Common uses

  • Alphabetising a list of names.
  • Ordering tasks by description length.
  • Reversing a log to see the newest lines first.

Frequently asked questions

Can it remove duplicates while sorting?

Use the Duplicate Line Remover first, then sort the result here.

Related tools