Drop your CSV files here
or click to browse your device
- CSV
- TSV
- TXT
- Files stay on your device
- 3 free uses, no account needed
- Works offline once loaded
Sort CSV rows in three steps
- 01
Add your CSV
Open the CSV from your device.
- 02
Choose the sort
Enter the column by header, letter or number. Add more separated by commas for a tie-break. Pick ascending or descending, and number, date or text mode.
- 03
Download the sorted file
The header stays on top and the format is unchanged.
What you get, and what to know
What you get
- Multi-column sortingType Country, City and rows are sorted by country first, then city within each country.
- Smart comparingDetect mode sorts numbers as numbers, dates as dates and everything else as text, so 10 comes after 9.
- Natural text orderText like item2 and item10 is ordered the way a person expects.
- Blanks go lastEmpty cells sort to the bottom in either direction.
- Stable and faithfulRows that tie keep their original order, and your separator and line endings are preserved.
Good to know
- One direction for all columnsAscending or descending applies to every sort column. To mix directions, sort in two passes.
- Ambiguous datesA date like 03/04/2024 is read day-first when possible. Standardise with Normalize date columns for certainty.
- Memory boundThe whole file is held in memory. Very large files are best sorted on a desktop browser.
When people use Sort CSV rows
Rank results
Sort by sales, score or price from largest to smallest.
Order by date
Put events or transactions in time order.
Alphabetise a list
Sort contacts by last name.
Prepare deterministic data
Sort before comparing two files line by line.
Picking the compare mode
Detect is right for most columns. Choose Numbers if a column mixes numbers and notes and you want the numbers ordered numerically with the rest after them. Choose Dates for a date column. Choose Text to force alphabetical order, for example for ZIP codes with leading zeros.
Combining with other tools
Sort after you Filter CSV rows down to the ones you need. Sort before Remove duplicate CSV rows when you want a particular copy to be the one that stays.
To sort an Excel workbook, convert it with XLSX to CSV, sort here, then turn it back with CSV to Excel.
Sorting never changes the content of a row, only its position. The header stays at the top when the header option is on, and rows with an empty value in the sort column drop to the bottom whichever direction you choose.
Questions, answered
How do I sort a CSV file by a column?+
Add the CSV, type the column, choose the order and download the sorted file.
Does sorting upload my CSV?+
No. Sorting is done in your browser.
Why does 10 sort before 9 sometimes?+
That is text order. Use Detect or Numbers mode to sort numerically.
Can I sort by two columns?+
Yes, list both separated by a comma. The second breaks ties in the first.
Does the header stay at the top?+
Yes, as long as the first-row option is on.
Will it work on my phone?+
Yes, on current iPhone and Android browsers. Sorting a very large CSV works best on a desktop.