T-47 · Text tools
Sort Lines
Sort lines A–Z, Z–A, naturally (item 2 before item 10), by length or number, shuffle or reverse them. Remove duplicates and empty lines too.
- Runs in your browser
- Nothing uploaded
- No account
7 lines in · 7 lines out
About this instrument
What it does
Paste a list with one item per line and sort it the way you need: alphabetically in either direction, naturally so that numbers inside the text are compared as numbers, by line length, by the first number on each line, in reverse order, or shuffled at random. Options let you ignore case, trim spaces, drop empty lines and remove duplicates in the same step.
How to use it
- Paste your lines.
- Pick a sort order and any clean-up options.
- Copy or download the sorted list.
FAQ
Common questions.
01What is natural sort order?
Natural sorting compares runs of digits as numbers, so “item 2” comes before “item 10”. Plain alphabetical sorting compares character by character and puts “item 10” first.
02Does removing duplicates respect case?
It follows the “Ignore case” option: with it on, “Apple” and “apple” count as the same line and the first one is kept.
03Is the order of equal lines preserved?
Yes. The sort is stable, so lines that compare as equal, for example lines of the same length, stay in their original order.
Related instruments
- T-03Remove Duplicate LinesDelete duplicate lines from a list, keeping the first occurrence. Options for case sensitivity, trimming, empty lines and sorting.Local
- T-04Text CompareCompare two texts line by line and see what was added or removed. Runs locally in your browser, so nothing is uploaded.Local
- T-46Remove Line BreaksRemove line breaks from text copied from PDFs and emails. Keep paragraphs, fix words split by hyphens, collapse extra spaces. Runs in your browser.Local