How to use the Sort Lines
- 1
Paste your lines into the Input pane or press Sample. The sorted result appears on the right as you type.
- 2
Pick an order. A to Z and Z to A sort alphabetically, Natural puts file2 before file10 and sorts numbers by value, Shortest first and Longest first sort by length, and Reverse and Shuffle reorder without comparing.
- 3
Leave Language-aware on so accented letters sort where readers expect them, and Ignore case on so apple and Apple sit together.
- 4
To sort a CSV or tab-separated list by one field, set By column to the column number and choose the delimiter.
- 5
Open the Duplicates or Clean up panel to remove repeats, drop empty lines or number the result in the same pass, then Copy or Download.
Features
- Alphabetical, reverse, natural, numeric, by length, reverse order and shuffle
- Natural sort that puts file2 before file10 and handles negative and decimal numbers
- Language-aware ordering with Intl.Collator, so accents and umlauts sort correctly
- Case-insensitive option and a stable sort that keeps equal lines in their original order
- Sort by a column of comma, semicolon, tab, pipe or space separated data
- Repeatable shuffle with a Reshuffle button
- Optional dedupe, trim, empty-line removal and numbering in the same pass
- Runs entirely in your browser; nothing is uploaded
Sorting the way people read
A plain alphabetical sort compares characters by their code, which surprises people in three ways: capital letters sort before lowercase ones, accented letters end up after Z, and numbers inside text sort digit by digit so that version 10 lands before version 2. This tool fixes all three by default. Ignore case keeps apple and Apple together, Language-aware uses your browser’s collation for your language, and Natural order reads numbers as numbers.
Every sort is stable, so lines that compare as equal keep their original order. That property lets you sort by more than one key: sort by the secondary key first, press the arrow to feed the result back in, then sort by the primary key.
Columns, lengths and shuffles
For delimited data, By column sorts whole rows by one field, such as a date in the third column of a CSV export. Shortest first is handy for finding stray fragments in a list of names or keywords. Shuffle produces a random order that stays the same until you press Reshuffle, which is useful for drawing winners or randomising a quiz.
Related tasks
To remove repeated lines before or after sorting, use Remove Duplicate Lines, which opens the same pipeline with deduplication first. To compare a sorted list with an older version, paste both into the Text Diff Checker.
Frequently asked questions
Why does file10 come before file2 in a normal sort?
How do I sort a list of numbers?
What does Language-aware do?
Is the sort stable?
Can I sort CSV rows by a specific column?
Is my data uploaded?
Last updated .