Sort CSV Rows
Put the rows of a CSV in order by one or more columns. Numbers, dates and text each sort the right way, and the file is never uploaded.
- Free, no sign-up
- Files stay on your device
- Numbers, dates or text
- Several sort columns
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
Sort CSV rows in three steps
No account, no email, no waiting for an upload.
- STEP 01
Add your CSV
Open the CSV from your device.
- STEP 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.
- STEP 03
Download the sorted file
The header stays on top and the format is unchanged.
What Sort CSV rows does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
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.
Your spreadsheets never leave your device
The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.
Typical online tool upload
Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.
Mediaextractr no upload
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
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.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
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.