← All Tools
CSV Sort🔒 100% local
Sort CSV data by columns. Privacy-first, no server uploads, no tracking.
Related Tools
Sorts the data rows of a pasted CSV by one column, taking the instruction from the last line as sort: age, sort: age desc or sort: name ascending. A column is compared numerically when every value in it parses as a number and as text with case-insensitive collation otherwise, quoted fields are decoded before sorting, and the header row is put back at the top of the output. The status line tells you which of the two comparisons was used.
How to use it
- Paste the CSV, header row on top.
- Add sort: followed by the column name as the last line, plus asc or desc if you want a direction.
- Press Process and copy the sorted CSV.
Worked example
name,age
John,30
Jane,25
Zoe,41
sort: age descbecomesSorted by: age (desc, numeric)
name,age
Zoe,41
John,30
Jane,25All three values parsed as numbers, so the column was sorted numerically and the status line says so.
city,pop
Berlin,3.6
Austin,0.9
sort: citybecomesSorted by: city (asc, lexicographic)
city,pop
Austin,0.9
Berlin,3.6No direction given, so ascending is assumed, and because the values are words the comparison is lexicographic.
When to use it
- You want the largest or newest rows at the top of a pasted export.
- You need an alphabetical list out of a CSV without opening a spreadsheet.
- You are checking whether a file really is sorted before an import runs.
What it does not do
- One column at a time, with no secondary sort. Rows that tie keep the order they arrived in.
- Values go through a lenient numeric parse that stops at the first non-numeric character, so 1,200 is read as 1 and 12 kg as 12, while a single non-numeric cell such as N/A pushes the whole column into text sorting, where 9 sorts after 10.
- The sort: line has to be the last non-empty line. Put it anywhere else and it is treated as a data row, and you get no sort at all.