CleanCSV

Sort a CSV File by Any Column

Sort rows by name, amount, date or any other column, with numbers ordered by value rather than as text, and download the sorted file.

Free, no sign-upFiles never leave your deviceCSV, Excel & JSON

CSV & Excel cleaning workspace

No account. No uploads. Just clean data.

100% in your browser
1

Upload your file

Drop your CSV or Excel file here

or browse your device. You can select several files at once.

CSV, TSV, TXT, XLSX, XLS, ODS and JSON · up to 50.0 MB and 250,000 rows

Your files never leave your device.

Step by step

How to use this tool

  1. 1

    Drop your CSV or Excel file into the tool above.

  2. 2

    Sort rows is on and sorts by the first column. Choose another column and A → Z or Z → A.

  3. 3

    Combine sorting with other options, for example standardize dates first so they sort correctly.

  4. 4

    Download the sorted file.

Smart number sorting

Plain text sorting puts “100” before “9”. This tool compares numbers by value, including negatives, decimals, thousands separators, currency symbols and percentages, so 9 comes before 10 and $1,200 after $950. Text is sorted alphabetically regardless of case, with numbers inside text in natural order, so “Item 2” comes before “Item 10”.

Sorting dates

Dates in YYYY-MM-DD format sort correctly. If your dates look like 05/01/2024, also turn on Standardize dates: it is applied before sorting, so the order is right even when the file mixes formats.

Blank values

Rows with an empty sort value always go to the bottom, whichever direction you choose, so they never push the rows you care about out of view.

Frequently asked questions

Can I sort by more than one column?

One sort column is supported per pass. For a secondary order, sort by the secondary column, download, upload the result and sort by the primary column: the sort is stable, so ties keep their previous order.

Does sorting happen before or after removing duplicates?

After. Duplicates are found in the original order, keeping the first or last occurrence, and the remaining rows are then sorted.