Monu Tools

行排序

按字母、数值或长度对文本行排序,可选择修剪、去除空白行和忽略大小写。

如何使用 行排序

  1. 01

    粘贴你的列表,每行一项。

  2. 02

    选择排序方式:按字母、数值、长度或反转。

  3. 03

    切换修剪、删除空行或忽略大小写,然后复制结果。

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.

常见问题

数值排序如何工作?

每行按其开头的数字排序,因此 2 排在 10 之前。开头没有数字的行会被放在底部。

忽略大小写有什么作用?

它在排序字母时不考虑大小写,因此 apple 和 Apple 会排在一起,而不是所有大写排在前面。

它会删除重复项吗?

它可以删除空行,你还可以搭配删除重复行工具,在排序前后去除重复的条目。

嵌入此工具

将此工具添加到你自己的网站。复制下方代码片段即可,它会自动保持最新。

<iframe src="https://monu.tools/embed/zh/sort-lines" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

相关工具