Can I sort a CSV by more than one column?
Yes. Add up to five sort levels, each with its own column, direction, and type. Later levels only break ties left by earlier ones.
Sort the rows of a CSV by one column or by up to five, each in its own direction. Numbers sort as numbers, dates sort as dates, and text sorts the way people expect, with 2 before 10. The header row stays on top and empty cells always go to the end.
Loading the CSV tools.
You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.
The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.
A multi-level sort orders rows by the first column you pick, then breaks ties using the second column, then the third, and so on, up to five levels. Sorting customers by state and then by last name is a two-level sort: every NY row stays together, and within NY the names run alphabetically.
Auto looks at the values in the column. Values that read as numbers are sorted in number order, including money such as $1,250.00 and accounting negatives such as (15.00), which sort below zero. Values that read as dates sort in date order. Anything else sorts as text, ignoring upper and lower case.
Yes. The sort is stable, which means rows that compare as equal on every level keep the order they had before. That matters when a file was already ordered by time or by entry, and you sort by a column such as state: within each state, the original order survives instead of being shuffled at random.
Yes. The sort changes the table in this tab, and every other tool works on the sorted result. A common sequence is to sort by date, use Remove duplicates with Keep the last so the newest copy of each record survives, and export. Undo keeps the last five changes if a sort was not what you wanted.
The arrow in each grid header also sorts by that single column with one click. The Sort tool is the one to use when you need several levels or need to force a type such as Date on a column that Auto reads as text.
All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.
Yes. Add up to five sort levels, each with its own column, direction, and type. Later levels only break ties left by earlier ones.
Numbers sort as numbers, and text uses natural number order, so 2 comes before 10. Choose Text explicitly only if you want plain character order.
Empty cells always go last, in both A to Z and Z to A order, so blanks never crowd the top of the result.
No. When First row is the header is on, the header stays on top and only the data rows are sorted.