Free online tools

Sort Lines Alphabetically or Naturally

Put a list of names, labels, or numbered files in order. Choose alphabetical sorting for words and natural sorting for labels that contain numbers.

Enter your values

Paste one entry per line. Duplicate entries stay in the list.

This tool processes your input in your browser.

Result

Sort names and numbered labels

Natural sorting interprets groups of digits as numbers. For a set of photos, that puts photo2.jpg before photo10.jpg. Alphabetical sorting uses the chosen language’s normal text collation and compares the digits as ordinary characters.

Choose the language of your list

Accented letters can appear at different points in the alphabet. For example, Swedish places Å, Ä and Ö after Z. Pick the language whose alphabet you expect. Use descending order when you want the later values first.

Frequently asked questions

What happens when two lines sort the same?

A tie keeps those lines in their original relative order, even when using descending order.

Will the tool delete duplicate lines?

Sorting keeps every copy of a repeated entry. The separate blank-line option can remove whitespace-only lines.

What about version numbers?

Natural sorting compares runs of digits within text. Use a Semantic Versioning sorter when prerelease tags and build labels matter.