Category: Text tools

Sort Lines

System ideaMissing a tool?

Alphabetical, numeric and length sorting for pasted text

Paste text lines and sort them alphabetically, numerically or by length. Toggle descending order, ignore case for text sort and copy locally.

Sorted lines
10
2
apple
banana
cherry

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

This line sorter works on pasted text and returns the sorted lines ready to copy. Choose alphabetical, numeric or length sorting, then optionally reverse the result with the descending toggle. Alphabetical mode uses the browser's localeCompare behavior, and ignore case lowercases lines before that alphabetical comparison only. LF, CRLF and bare CR line endings are accepted, and blank or whitespace-only lines are always removed. Numeric mode treats a line that is not a number as 0 rather than flagging it. Length mode counts UTF-16 code units, so characters outside the Basic Multilingual Plane may count as two. The tool does not perform natural or version sorting, deduplicate, shuffle, reverse only, choose a locale, sort by a CSV column or handle uploaded files. The text stays in your browser.

How to use it

  1. Paste a line-separated list that you want to reorder.
  2. Choose alphabetical, numeric or length sort, then set descending order or ignore case when relevant.
  3. Copy the sorted output; blank lines are removed automatically.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Does sorting also remove duplicate lines?
No. Sorting never deduplicates in this tool. Use the duplicate-line remover if you need a unique list.
Will item10 come after item2?
Not in alphabetical mode. LocalTools does not implement natural or version sorting, so item10 may sort before item2 as plain text.
What happens to lines that are not numbers in numeric mode?
They are treated as 0 for the numeric comparison. The tool does not show an error or move them to a special section.
Does ignore case affect numeric or length sorting?
No. Ignore case only applies to alphabetical sorting. Numeric and length modes ignore that option.
Are blank lines kept in the sorted result?
No. Blank and whitespace-only lines are always removed before the sorted result is produced.