Sort lines of text alphabetically, numerically or by length, with options to trim, deduplicate blanks and ignore case.
How to use the Sort Lines
Paste your list with one item per line.
Choose how to sort: alphabetically, numerically, by length or reversed.
Toggle trim, remove empties or ignore case, then copy the result.
This line sorter orders a list alphabetically, numerically or by length, ascending or descending, and can also simply reverse the current order.
It is the quick way to tidy a list: alphabetizing names or tags, ordering log lines, arranging a keyword list, or sorting any block of text where one item sits per line.
Numeric sorting reads the number at the start of each line, so 2 comes before 10 instead of the alphabetical order that would put 10 first. Lines without a leading number are placed at the bottom.
Sorting by length orders lines from shortest to longest, or the reverse, which is useful for spotting outliers or grouping similar entries.
Cleanup options make it tidy: trim whitespace from each line, drop blank lines, and ignore case so apple and Apple sort together rather than all capitals coming first.
To also remove repeats, pair it with the remove duplicate lines tool. Everything runs in your browser, so your list stays private.
Frequently asked questions
Each line is sorted by the number at its start, so 2 comes before 10. Lines without a leading number are placed at the bottom.
It sorts letters without regard to capitalisation, so apple and Apple sit together instead of all capitals coming first.
It can drop empty lines, and you can pair it with the remove duplicate lines tool to also strip repeated entries before or after sorting.
Yes. You can sort by line length, choose ascending or descending, or simply reverse the current order without re-sorting.
Yes. Sorting runs entirely in your browser, so nothing you paste is uploaded.
Embed this tool
Add this tool to your own website. Copy the snippet below; it stays up to date automatically.
<iframe src="https://monu.tools/embed/en/sort-lines" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>Related tools
Translate text to Morse code and Morse code back to text, using the international standard.
Convert Markdown to HTML and HTML back to Markdown, with a live preview. Works in both directions.
Extract the text from a PDF and get it as Markdown, entirely in your browser. Your file is never uploaded.
Convert a Word .docx document to clean Markdown in your browser, preserving headings, lists and formatting.