← All tools
// Text

Text Sorter online

Sort lines alphabetically, by length, numerically, or randomly

Text Sorter logo
by
CHUNKY
MUNSTER
// Input
// Sorted output
Output will appear here...

How to Use the Text Line Sorter

  1. Paste or enter your input into the text field.
  2. Configure any options (format, delimiter, encoding, or mode) using the controls above the output.
  3. The result updates instantly — no submit button required for most operations.
  4. Click Copy or Download to take the output to your next step.

Paste your lines, pick a sort mode and direction, and the result appears instantly. Alphabetical sort uses Intl.Collator, which means accented characters are ordered correctly (é falls near e, not at the end of the alphabet) and the sort respects the user's locale. Numerical sort parses each line as a number, falling back to alphabetical for non-numeric lines.

How the Text Line Sorter Works

Case-insensitive mode treats 'Apple' and 'apple' as equal for ordering. Dedupe mode removes consecutive duplicates after sorting — paste a list of 1,000 emails to get a clean unique sorted set in one step. The tool handles tens of thousands of lines without any noticeable lag.

Frequently Asked Questions

Are accented characters sorted correctly?

Yes — sorting uses Intl.Collator, which handles locale-specific ordering. é sorts near e, ñ near n, and so on, instead of being shoved to the end like a naive byte sort would do.

Does numerical sort handle decimals and negatives?

Yes — each line is parsed with parseFloat, so -3.14 sorts before -1, which sorts before 0, which sorts before 2.5. Lines that don't parse as numbers fall back to lexicographic order.

Can it remove duplicate lines while sorting?

Yes — enable the dedupe option. It removes adjacent duplicates after sort, which is equivalent to sort -u in Unix.

Is case ignored when sorting?

By default no — uppercase letters precede lowercase. Toggle the 'case-insensitive' option for the more intuitive 'A' = 'a' behaviour.

Explore the full suite of Text tools and 290+ other free utilities at Chunky Munster.