Back to Tools

Sort Lines

Processed Locally

Sort text lines alphabetically or numerically. Options for case sensitivity, reverse order, and removing empty lines

Options

Frequently Asked Questions

Alphabetical sorting arranges lines in dictionary order (A-Z or Z-A). By default, it's case-insensitive, meaning "apple" and "Apple" are treated the same. Enable "Case Sensitive" to distinguish between uppercase and lowercase.
Numeric sorting treats each line as a number and sorts them mathematically. For example: 1, 2, 10, 20 (not 1, 10, 2, 20). Non-numeric lines are sorted alphabetically and placed after numbers.
Reverse order flips the sorted result. If you sort A-Z and enable reverse, you get Z-A. This works with both alphabetical and numeric sorting.
This tool detects duplicates and shows a warning, but doesn't automatically remove them. Use our "Unique Lines" tool (coming soon) to remove duplicates.