Sort Text Lines Online: Alphabetical, Reverse, and Natural Order

3 min read

Sorting lines of text is useful for organizing lists, cleaning data, comparing files, and preparing content for analysis.

Sort Types

  • Alphabetical (A→Z): Standard dictionary order
  • Reverse (Z→A): Descending order
  • Natural sort: "item2" before "item10" (human-friendly)
  • Case-insensitive: Ignores uppercase/lowercase differences

Command Line

# Alphabetical
sort file.txt

# Reverse
sort -r file.txt

# Natural/version sort
sort -V file.txt

Online Tool

Use our sort lines tool for instant sorting.