Sort Lines Tool
Paste a list and sort it instantly with natural, numeric, or lexicographic order. Combine blank-line cleanup, deduplication, and locale-aware sorting without sending data anywhere.
settings_suggest
Advanced options
expand_more
How it works
-
1
Paste your list
Drop newline-separated text into the input area.
-
2
Choose a sort mode
Natural sort is the default; numeric and lexicographic are one click away.
-
3
Copy or download
Grab the sorted results instantly or continue chaining.
Examples (click to load)
Click a card to load its inputSort mode differences
Natural
Uses locale-aware natural sorting so 1, 2, 10 are ordered correctly.
Numeric
Extracts numbers and sorts by numeric value, supporting decimals and exponents.
Lexicographic
Pure string comparison using the selected locale.
Privacy & limitations
- All processing runs locally in your browser.
- Very large inputs disable auto update to keep the UI responsive.
- CSV column sorting is not supported in this tool.
FAQ
Q. How do I sort 1, 2, 10 in the expected order?
Choose Natural sort. It treats number fragments as numbers, so 1 → 2 → 10.
Q. Can I switch ascending or descending?
Yes. Use the Asc/Desc toggle next to the sort mode buttons.
Q. What happens with duplicates?
Duplicates are kept by default. Turn on “Remove duplicates” to keep only the first.
Q. How do I sort file2 and file10 correctly?
Natural sort places file2 before file10.
Q. What about lines that mix text and numbers?
Use “first number in line” or move non-numeric lines to the top or bottom.