Text & String Utilities100% Client-Side

Sort Text Lines A to Z or Z to A

Paste a list with one record per line to sort the lines as units. Choose ascending or descending order, then decide whether the tool should take letter case or embedded digit sequences into account. Natural sorting is useful for numbered labels such as item 2 and item 10. Each record keeps its text as entered, including spaces and any punctuation that are part of that line.

Configuration Options
Input
19 chars•3 lines
Output

How to Use the Sort Text Lines Alphabetically Online

  1. 1Paste one label or record per line so the whole line moves when sorted.
  2. 2Choose ascending or descending order.
  3. 3Enable natural sorting if numbered items should follow the numeric order of their digits.
  4. 4Check the grouping of accented labels and any blank lines before copying the list.

Input & Output Examples

Ascending order with Natural Sort on handles the digits as numbers.

Input Sample
file 10
file 2
file 1
Expected Output
file 1
file 2
file 10

Descending order with Case Sensitive off moves whole lines and preserves their original spelling.

Input Sample
blue sky
Apple pie
cherry tart
Expected Output
cherry tart
blue sky
Apple pie

Practical Developer Workflows

  • Put a list of draft labels into alphabetical order while keeping each label intact.
  • Arrange filenames with sequential numbers so item 2 comes before item 10.
  • Compare the same records in forward and reverse collation order for a test fixture.

Zero Server Uploads & Complete Privacy

Runs 100% in your browser; no data is uploaded to any server.

Notice a bug, calculation error, or outdated info?

Let us know directly so our engineering team can fix it.

Frequently Asked Questions

Natural sorting compares digit sequences as numbers within a line. With this option on, file 2 sorts before file 10. Turn it off when you need a text comparison that treats the digits as ordinary characters.

Explore Other Tools

12 suggested tools

View all tools