Line Sorter
Sort text lines with options
Paste multiline text and sort it first; natural-sort and trim rules are available in Advanced mode.
The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.
About this tool
Sort one item per line, keeping duplicates unless you explicitly remove them. Choose ascending or descending order and case handling; Advanced exposes natural sorting and trimming. This sorts entire lines, not a CSV column, a log timestamp or semantic versions. Keep the source order when it controls execution or records a sequence of events.
Suggested Workflow
Production Snippets
Sorting does not imply deduplication
text
item10
item2
item2
Natural sorting; duplicate removal off:
item2
item2
item10Frequently Asked Questions
How do natural and plain sorting differ?
Natural sorting uses the browser’s English numeric collation, so item2 precedes item10. Plain sorting compares strings (lowercased when Ignore case is on). It is not SemVer precedence or a cross-runtime collation contract.
Which duplicate survives?
The first matching input line survives before sorting. With Ignore case on, Apple and apple share a key. Trimming, when enabled, happens first.
Are blank lines preserved?
Zero-length lines are removed. A whitespace-only line survives only if Trim each line is off. Input and settings are saved in a local browser draft; Clear removes that draft.
Keep browsing