全球免费使用

文本行排序

按所选语言对行进行升序或降序排序。

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

输入

提示:按 Ctrl + Enter 运行

你的结果

结果将显示在这里。

下方的详细帮助目前仅提供英文版。

关于此工具

Sort a list of names, tags, file names or bibliography entries in ascending or descending order. The sort uses your language’s collation rules, so accented letters fall next to their unaccented forms, and numbers inside text are compared as numbers: "item 2" sorts before "item 10", unlike a plain character-by-character sort.

使用方法

  1. Paste the lines you want to sort.
  2. Choose ascending (A to Z) or descending (Z to A).
  3. Run the sort.
  4. Copy the result; remove repeats first with remove duplicate lines if needed.

计算原理

Lines are compared with Intl.Collator for the page language with numeric ordering enabled. Descending order reverses the comparison.

计算示例

Sorting "item 10", "item 2", "Éclair", "eclair" and "zebra" in ascending order gives eclair, Éclair, item 2, item 10, zebra. The accented É sits beside the plain e, and 2 comes before 10.

示例输入和结果

梨 / 苹果 → 苹果 / 梨

局限性

  • Sorts whole lines only.
  • Language rules come from the page language you are browsing in.
  • Blank lines sort to the top in ascending order.

最后更新:

常见问题

Is the sort case-sensitive?

Uppercase and lowercase versions of a letter are grouped together, with a consistent tie-break, as in a dictionary.

Why does "10" come after "9"?

Numeric collation compares numbers by value, which is what most people expect in lists of files or items.

Can I sort by a column?

No, whole lines are compared from the first character. For spreadsheets, sort in the spreadsheet or use the CSV cleanup tool.

故障排除

Lines starting with a space sort first.

Leading spaces affect order. Clean them with the whitespace cleaner.

Order differs from Excel.

Excel uses its own collation; differences around punctuation and accents are expected.

I want to shuffle instead of sort.

Use the random number generator to pick items, or the spin the wheel tool.

隐私 & 免费使用

我的输入会被保存吗?

你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。

这个工具免费吗?

是的。无需注册或付费。

在浏览器中处理

推荐下一步