Sort Lines

Put a list in alphabetical or reverse alphabetical order with a live preview.

✓ Free to use · Runs in your browser · No sign-up

1. Add your text

Your results update as you type. Everything stays in this browser; your text is not uploaded.

Type or paste up to 100,000 characters. Spaces and line breaks are included in the limit.
Each whole line is one item. Numbers are sorted as text.

Updating your results…

How to use Sort Lines

  1. Put each list item on its own line.
  2. Choose A to Z or Z to A and, if needed, distinguish capital letters.
  3. Check the new order, then copy or download it.

A closer look

Sorting rearranges entire lines using English alphabetical comparison. It keeps repeated entries, spaces within entries, and blank lines; it does not clean or delete them. By default, upper- and lowercase variants compare equally and retain their relative order. The capital-letter option uses uppercase first for otherwise equivalent entries in ascending order. Number strings are sorted as text, not by numeric value.

A practical example

Place Zebra, apple and Banana on separate lines to sort them as apple, Banana, Zebra. Number strings use text order, so this is not a numeric sorter.

A useful tip

For example, 10 sorts before 2 because the first character is compared. Use this tool for names and labels rather than numerical ranking.

Good questions. Simple answers.

Are duplicate lines removed?

No. Use Remove Duplicate Lines if you want to keep only one copy of each item.

Why is an item with a leading space in an unexpected place?

Spaces are part of the line. Clean the text with Remove Extra Spaces first if they are accidental.

Explore all text tools for related tasks and category-specific guidance, or read how Toolzafi handles your data.

A few more useful tools