Sort Text Lines

Sort lines alphabetically, in reverse, or by length, with an option to ignore letter case.

Try an example

Load a ready-made sample into this tool and run it. Every result you see is calculated live by the tool itself — nothing here is a pre-written answer.

Sample: input: banana apple cherry apple; order: az; ignorecase: True

How to Use

  1. Paste one item per line.
  2. Choose a sort order.
  3. Click Run and copy the ordered list.

What this tool does

Use this tool to sort lines alphabetically: paste one item per line and it orders the list from A to Z, in reverse, or by line length. Sorting a list with an alphabetizer like this one is the quick way to organize names, keywords, tags and inventories so duplicates and gaps are easy to spot. The sorted list is ready to copy.

Sort orders and case

Choose A to Z for a standard alphabetical list or Z to A to flip it. The length options arrange lines from shortest to longest or longest to shortest, which helps when entries should be grouped by size. Turn on Ignore letter case when capital and lowercase entries should be sorted together by letter alone.

Good to know

Sorting is plain text ordering, and numbers sort as text, so 10 comes before 2 because it starts with 1. Numbers only line up numerically if you sort by length or pad them to the same width, such as 02 and 10. Keep that in mind for numbered lists.

Frequently asked questions

How do I sort a list alphabetically?

Paste your list with one item per line, choose A to Z as the order, and click Run. Copy the ordered list from the result.

Why is 10 sorted before 2?

The tool sorts characters as text, and 1 comes before 2, so 10 appears earlier. Sorting by length, or writing numbers with the same width, avoids this.

Does sorting happen on my device?

Yes. The sort runs in your browser, so your list stays on your device and is not uploaded to a server or stored by the tool.

How to use Sort Text Lines

  1. Paste one item per line.
  2. Choose a sort order.
  3. Click Run and copy the ordered list.

Limitations

Sorting is plain text ordering; numbers sort as text (10 before 2) unless you sort by length.

Browse all tools · More Text & Writing tools

Scroll to Top