Data & CSV

Sort and Filter CSV

Sort and Filter a CSV File

Sort a CSV by one or more columns, filter rows by conditions, and download only the rows you need.

About this tool

About Sort and Filter CSV

Need only the orders from one country, the customers who spent more than 500, or a list sorted by date? Open the CSV and the filter bar is ready. Add as many conditions as you like (contains, does not contain, is, starts with, greater than, less than, is empty, or a regular expression) and choose whether rows must match all of them or any of them. Number columns compare as numbers, so 100 comes after 20, and text sorts naturally, so file2 comes before file10. Click a column header to sort it, and Shift-click another header to break ties. The status line shows how many rows match. When the view is right, Export saves exactly those rows and columns, in that order, as CSV, Excel-friendly CSV, TSV or JSON. You can also delete the matching rows or keep only them. Everything runs in your browser, even for files with hundreds of thousands of rows.

Built and maintained by Abhi JainUpdated

How to Sort and Filter a CSV

  1. 1

    Open the CSV

    Drop the file on the page or paste the data. The filter bar opens automatically.

  2. 2

    Add filters

    Click Add filter, pick a column and a condition such as > (greater than), and type the value. Add more and choose Match all or Match any.

  3. 3

    Sort

    Click a column header to sort ascending, again for descending. Shift-click a second header for a tie-breaker.

  4. 4

    Export the result

    Open Export, keep What you see selected, and download CSV, TSV or JSON.

Sort and Filter CSV: questions and answers

How do I filter a CSV file without Excel?

Open it here, click Add filter, choose the column, a condition and a value. Only matching rows are shown, and Export saves just those rows.

Can I sort by more than one column?

Yes. Click the first column header, then hold Shift and click the next one. Small numbers on the headers show the sort order.

Why does 100 sort after 20 here but not in other tools?

Columns that contain only numbers are compared as numbers, not as text. Text is sorted naturally, so item2 comes before item10. Blank cells always go last.

Does filtering delete rows from my file?

No. Filters only hide rows from view. Your data changes only if you choose Delete the rows shown or Keep only the rows shown, and Undo reverses either.

More CSV Viewer & Editor presets