Free online tools to generate, calculate, convert, format, transform, and de/en-code.
 

Line Sorter

Sort text lines alphabetically in ascending or descending order. Supports case-sensitive sorting, natural number sorting, and duplicate removal.


Input Text

Each line will be sorted independently
Direct links to .txt or .csv files

Sorted Output

Sort results will appear here...

About Line Sorting

Features
  • Alphabetical Sorting: Sort lines A-Z or Z-A
  • Case-Sensitive: Option to treat uppercase and lowercase differently
  • Natural Sorting: Intelligently sorts numbers within text (e.g., "file2.txt" comes before "file10.txt")
  • Remove Duplicates: Optionally filter out duplicate lines
  • Remove Blanks: Automatically remove empty lines
  • Statistics: View counts of total, unique, duplicate, and blank lines
Sorting Modes
Standard Alphabetical

Default sorting uses case-insensitive alphabetical order:

  • apple
  • Apple
  • banana
  • Cherry
Natural Sorting

Natural sort handles numbers intelligently:

  • file1.txt
  • file2.txt
  • file10.txt
  • file20.txt
Without natural sort: file1, file10, file2, file20
Use Cases
  • Organize lists of names, items, or categories
  • Sort file names or directory listings
  • Clean up and alphabetize data exports
  • Remove duplicate entries from lists
  • Prepare sorted data for import into other systems
Tips
  • Natural Sort: Enable this when sorting file names or text containing numbers
  • Case-Sensitive: Use when capitalization matters (e.g., programming identifiers)
  • Duplicates: Remove duplicates to create unique lists
  • Keyboard Shortcut: Press Ctrl+Enter in the text area to sort quickly


Feedback

Help us improve this page by providing feedback:


Share with