How to use the Sort CSV
- Load a CSV file.
- Enter the column to sort by. For a tie-break add a second column after a comma.
- Tick "Sort as numbers" for amounts. Tick Descending for the reverse order.
- Press Sort and download the result.
Order the rows of a CSV by one or several columns. Text sorts alphabetically with natural number handling, so item 2 comes before item 10. Switch to numeric sorting for amounts and prices. The sort is stable: rows that tie keep their original order.
CSV file
Drag a file here, or
This example was produced by the same code the tool runs, with these settings: columns = price, numeric = true. You can download the sample file(s): items.csv.
item,price,qty Item 10,4.50,3 Item 2,12.00,1 Item 1,$3.25,8 Widget,7,2
item,price,qty Item 1,$3.25,8 Item 10,4.50,3 Widget,7,2 Item 2,12.00,1
Result summary: Sorted 4 rows by price (A to Z / low to high).
CSV, TSV, TXT.
Order an export of products by price, highest first, before sharing the top rows.
Sort by country and then by name so related rows sit together.
That happens in plain text sorting. This tool uses natural ordering for text, and a numeric mode for values like prices.
Yes, when the first-row option is ticked.
Yes, list them separated by commas. The second column breaks ties in the first.
Category: CSV Tools