Sort Lines Tool
100% PrivateText & Writing ToolsSort a list of lines alphabetically, by length, numerically or in reverse.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
Sort by
- 1Paste your list, one item per line.
- 2Choose a sort mode: A to Z, Z to A, numeric low to high or high to low, shortest or longest first, or reverse order.
- 3Read the sorted result below.
- 4Copy or download the sorted lines.
Worked example
Natural alphabetical order
Input: item 10 item 2 item 1 Sorted A to Z, the result is: item 1 item 2 item 10 The numbers inside the text are compared as numbers, not as single digits.
- Numeric modes sort by the first number found at the start of each line; lines without a leading number are placed last.
- Alphabetical sorting ignores case differences when comparing, so apple and Apple sit next to each other.
- Length is measured in characters, including spaces.
Not directly. Run the list through Remove Duplicate Lines first, then sort the cleaned result here.
About this tool
The Sort Lines Tool arranges a list of lines alphabetically, by length, by the number each line starts with, or in reverse order. Alphabetical sorting is natural, so item 2 correctly comes before item 10, which plain text sorting usually gets wrong.
Related tools
Remove Duplicate LinesRemove repeated lines from a list and keep each line once, in its original orderText & Writing ToolsOpenText CleanerClean pasted text by removing extra spaces, stray punctuation, accents or hidden charactersText & Writing ToolsOpenReverse TextReverse text character by character, or flip the order of its words or linesText & Writing ToolsOpenFind and ReplaceFind and replace every occurrence of a word or pattern in your text, with regex supportText & Writing ToolsOpen
Advertisement
Part of Ovatly's free tools in Text & Writing Tools.