woori.today
Family Sites

Sort Lines

Sort text lines in ascending or descending order.

Sort Lines: Input / Result

Input

pear
apple
banana

Result

apple
banana
pear

How it works

Compares each line using the selected locale and returns them in ascending order. Numeric portions are compared by value, while letter case is treated as a base-level difference.

A practical use

Use it to organize names or version labels. With numeric sorting, `item10`, `item2`, `item1` becomes `item1`, `item2`, `item10`.

When something goes wrong

Leading and trailing spaces are not trimmed, so inspect whitespace and the selected locale when the order looks unexpected. Blank lines are entries too; descending mode simply reverses the comparison.

Tool-specific question

Are lines containing numbers sorted lexically?

No. Numeric comparison puts `item2` before `item10`. Ordering follows the selected locale, and strings that differ only by letter case compare at the same base sensitivity.

How to use

  1. Enter an input or choose settings; you can start with pear apple.
  2. Paste text, then choose the transformation, separator, or portion to process.
  3. Run Sort Lines, then compare the result with the example apple pear before copying or downloading it.

Options

The input area shows the accepted format and available controls for this tool.

Privacy

No. Your input is handled in the browser you are using. Privacy

Related tools