Sort Lines
Put newline-separated items in alphabetical order, reverse the order, or compare embedded numbers naturally. Duplicates remain in the result.
Runs locally in your browser
What is the Sort Lines?
Put newline-separated items in alphabetical order, reverse the order, or compare embedded numbers naturally. Duplicates remain in the result.
How to use it
- 1Paste one item per line.
- 2Choose ascending or descending order and natural number sorting.
- 3Copy the sorted list.
How it works
The browser’s Intl.Collator compares lines. Natural number mode treats the digits in “Item 2” as smaller than the digits in “Item 10.”
Natural order
Item 10, Item 2, Item 1 sorts to Item 1, Item 2, Item 10 when natural number order is enabled.
Limitations & notes
- Sorting rules can differ slightly across browser locales.
- Blank lines are retained and sorted with the other lines.
No directly related discussion yet.
Start a focused thread and share the question this tool helped you explore.
Ask the community about Sort Lines