Sort Lines

Order lines alphabetically, numerically or by length, in either direction.

Tool Panel

Processed locally
Loading tool...
About Sort Lines

Sorts lines alphabetically or numerically, ascending or descending, with optional de-duplication. Numeric mode compares values rather than strings.

  • 1

    Sorting is **locale-aware** rather than ASCII: it uses ICU rules (`zh-Hans-CN`), so Chinese orders by pinyin (`李四 / 王五 / 张三`), Latin letters ignore case differences, and digits still compare character by character (`item1 / item10 / item9`).

  • 2

    With the numeric switch on, rows where **both sides are numbers** compare by value (`9` before `10`); in a mixed list, pairs that cannot be compared fall back to string order — nothing scrambles, but do not expect natural-sort cleverness.

  • 3

    Cleanup is on by default: lines are trimmed and empty ones dropped (untick to keep them as-is). Deduplication is a separate switch and off by default.

Related tools

View all
Text Tools

Word Counter

Count characters, words and lines as you type.

Text Tools
Text Tools

Case Converter

Switch between upper, lower, camel, snake and other case styles.

Text Tools
Text Tools

Text Diff

Compare two texts and highlight exactly what changed.

Text Tools
Text Tools

Find and Replace

Replace across a whole document, with optional regular expressions.

Text Tools

Text Cleaner

Strip extra spaces, blank lines and stray markup in one pass.

Text Tools
Text Tools

Remove Duplicate Lines

Drop repeated lines and leave the list unique.

Text Tools

Join Lines

Merge many lines into one using any separator.

Text Tools
Text Tools

Split Text

Break text apart by delimiter, length or pattern.

Text Tools