CSV Column Sorter
Sort your CSV rows by any column, ascending or descending. Automatically detects numeric vs text values for correct sort order.
About CSV Column Sorter
The CSV Column Sorter reorders all data rows in your CSV by the values in a chosen column. It automatically detects whether the column contains numbers or text and uses the appropriate comparison - numeric sort for number columns, and locale-aware alphabetical sort for text columns.
How to Use
- Upload a CSV file or paste CSV text.
- Select the Column to sort by.
- Choose Ascending or Descending order.
- Toggle Numeric Sort if the column contains numbers.
- Click Sort and download or copy the sorted CSV.
How It Works
The CSV is parsed, the header row is preserved, and the data rows are sorted using JavaScript's Array.sort() based on the selected column values. Numeric sort converts values to numbers before comparing.
Example
Sort a product list by Price (numeric, ascending) to see cheapest items first. Sort by Name (text, ascending) to produce an alphabetical product directory.