Sort Lines
Order lists alphabetically, naturally, numerically, or by length.
Enter text to get started.
How to use Sort Lines
- Paste or type your input. You can also load the example below.
- Adjust the available options. Results update after you finish typing; for very large inputs, select Run.
- Review the result, then copy it or download it to your device.
Input and output examples
Sort a list alphabetically from A to Z
Input
pear
apple
bananaOutput
apple
banana
pearUse natural sorting for numbered filenames
Input
file10.txt
file2.txt
file1.txtOutput
file1.txt
file2.txt
file10.txtHow this tool works
Comparison normalization never rewrites retained lines. Equal keys retain input order even when descending. Numeric mode reads the first signed decimal (dot or comma) and leaves lines without numbers at the end. Length counts grapheme clusters. Deduplication compares complete normalized line text.
Input and output stay in the current page. Refreshing or closing the page clears them. For very large inputs, use Run to start processing; a task that takes too long is stopped so you can change the input.
Frequently asked questions
What is natural sorting?
It compares digit runs as numbers, so file2 sorts before file10.
Are accents removed when ignoring case?
No. Case is ignored while accented letters remain distinct under English locale collation.