Text tool

Line Sorter

Put a list in a predictable order while choosing how numbers, case, comparison whitespace, and empty lines should behave.

In-browser processingNo account requiredPrivacy details ↗

Kept empty lines move as a group; their relative order is unchanged.

Only the comparison key changes. Original line text stays intact.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste one item per line, up to 100,000 characters and 50,000 lines.
  2. Choose the order, comparison method, empty-line rule, and optional comparison-only cleanup.
  3. Sort the lines, review the count, then copy or download the TXT result.

Comparison choices with clear boundaries

English alphabetical mode uses an English collator. Natural-number mode compares digit sequences numerically, so item2 comes before item10. Exact code point mode compares Unicode values directly. Ignore case and trim edges affect comparison keys only; every retained line keeps its original text.

Stable results and explicit empty-line handling

Equal comparison keys keep their input order. Empty lines can stay grouped first or last, or be removed. CRLF and CR endings become LF, and the result reports both input and retained line counts. Input is limited to 100,000 characters and 50,000 lines.

GOOD TO KNOW

Common questions

Does trimming change my lines?

No. Trimming is used only to make the comparison key; the original leading and trailing spaces remain in the result.

How does natural-number sorting work?

Digit sequences are compared numerically inside an English collator, so file2 sorts before file10. Text without numbers still follows alphabetical comparison.

What happens to equal lines?

Sorting is stable: lines with equal comparison keys keep the order in which they appeared.