Monu Tools

Sort Lines

Sort lines of text alphabetically, numerically or by length, with options to trim, deduplicate blanks and ignore case.

How to use the Sort Lines

  1. 01

    Paste your list with one item per line.

  2. 02

    Choose how to sort: alphabetically, numerically, by length or reversed.

  3. 03

    Toggle trim, remove empties or ignore case, then copy the result.

What it does

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 and length sorting

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

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.

Runs in your browser

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

How does numeric sorting work?

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.

What does ignore case do?

It sorts letters without regard to capitalisation, so apple and Apple sit together instead of all capitals coming first.

Does it remove duplicates?

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.

Can I sort by length or reverse the order?

Yes. You can sort by line length, choose ascending or descending, or simply reverse the current order without re-sorting.

Is my list private?

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