Line Sorter
Free online line sorter tool, no installation required
About Line Sorter
This tool reorders the lines of a text block in three ways: numeric-aware ascending or descending sort, plain reverse, or random shuffle. Sorting uses natural numeric comparison so that version-like and number-prefixed lines order correctly, and an optional Unique-only filter removes duplicate lines during the sort.
How to Use
1. Choose the sort Order with the select (Ascending or Descending). 2. Tick the Unique-only checkbox if you want duplicate lines dropped during sort. 3. Paste your text into the Input area. 4. Click Sort to apply the configured sort, or click Reverse or Shuffle for a non-sorted reorder. 5. Read the result in the Output area and click Copy to copy it.
Sort Order and Natural Comparison
The Order select controls ascending versus descending and only affects the Sort button; Reverse and Shuffle ignore it. Sorting uses localeCompare with the numeric option enabled, so lines beginning with numbers compare as numbers (for example, 'file2' sorts before 'file10'). The Unique-only checkbox is also only applied by the Sort action; Reverse and Shuffle preserve duplicates. Empty and whitespace-only lines are filtered out only by Sort, while Reverse and Shuffle keep them verbatim.
▶Why does 'file2' sort before 'file10'?
▶Does the Order select affect Reverse or Shuffle?
▶Are blank lines preserved?
▶Is my data sent to a server?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee