Skip to content
hateitall

Sort Lines

Put a list in order the way a person expects: accents in the right place, numbers in number order.

Processed locallyIn: Text, TXT, CSVOut: Text

Loading tool…

How to use sort lines

  1. Paste the lines to sort.

  2. Choose A to Z, natural or by length.

  3. Set ignore case, reverse order, blank lines and leading spaces.

  4. Pick the alphabet rules if your list is in another language, then copy the result.

What this tool does

  • Sorts with Intl.Collator, so accented letters sort beside their base letter and each language's own order is respected.
  • Natural sort puts "file2" before "file10".
  • Sorts by length in visible characters, with ties sorted alphabetically.
  • Stable: lines that compare equal stay in their original order.

How the result is verified

After sorting, every line is compared with the next one using the same rules, and the check fails if any pair is out of order.

Frequently asked questions

What is natural sort?

Natural sort reads runs of digits as numbers, so "item 2" comes before "item 10". A plain alphabetical sort compares character by character and puts "item 10" first, because 1 comes before 2.

Why do accented letters sort differently in Swedish?

Each language has its own alphabet order. In Swedish, å, ä and ö come after z; in German, ä sorts with a. Pick the language under Alphabet rules to get the order its readers expect.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Delete repeated lines, keep order, ignore case or spaces

Text · TXT · CSV→ TextLight on device

Flip line order, words on each line, or every character

Text · TXT→ TextLight on device

Random line order with a fair, crypto-random shuffle

Text · TXT→ TextLight on device

Search, filter and multi-column sort, then download the rows shown

CSV · TSV · Text→ CSVLight on device