CSV Filter Tool

Sometimes you only want the rows for one country, one status, or one customer, not the entire export. This filter reads your CSV, takes a column index and a piece of text, and emits only the rows where that column contains the text (case-insensitive substring match). The header row is carried through, so the output is still a valid CSV you can paste straight into a spreadsheet or another tool.

How to filter a CSV

  1. 1

    Paste the CSV

    Use the checkbox to tell the filter whether row 1 is a header or the first data row.

  2. 2

    Pick the column

    1-based index of the column to match against, e.g. `3` for the third column.

  3. 3

    Type the match text

    Substring match, case-insensitive. Empty string passes every row through unchanged.

  4. 4

    Run filter

    Matching rows are emitted in original order; non-matches are dropped. The header (if present) is always kept.

Matching strategy and practical examples

The filter uses a case-insensitive str_contains on the target column, with the header row always passed through untouched. That is deliberately simple, one operator, one column, one needle, so it stays predictable on messy exports.

Example: filter orders by country

order_id customer country total
1001 Alice FR 42.00
1002 Bob DE 18.50
1003 Carla fr 91.75
1004 Dan ES 30.00

Filter on column 3 with fr and you get rows 1001 and 1003, the match is case-insensitive, so FR and fr both pass.

Tips

  • Normalise first if you can. Run toLowerCase on your source data or pass it through a cleaning script so the filter has a consistent column to chew on.
  • Combine filter passes. You can run the filter, copy the output, and filter again on a different column to chain conditions.
  • For complex logic, switch to SQL or a spreadsheet. This tool shines at quick slices; compound predicates (country = FR AND total > 50) are easier in SQL or Excel filters.

Edge cases

  • Rows where the target column is shorter than expected (ragged CSV) are treated as empty in that column and therefore fail a non-empty match.
  • The match is substring-based: US matches United States, plus, and musical. Use a more specific needle or a different column if that is too loose.
  • Commas inside quoted cells are preserved; the parser walks through full CSV parsing before checking the target column.

Frequently Asked Questions

Not directly, the filter does substring text matching. For ranges, open the CSV in a spreadsheet or query it with SQL and use proper comparison operators.

No. Both the cell value and the search text are lowercased before comparison, so FR, fr and Fr all match the same rows.

Today the filter is inclusive only (keep matches, drop the rest). For exclusion, reach for a tool with regex or SQL-like expressions, or use the keep-matches output as a blacklist and remove those rows from the original.

The CSV is sent to our server to run the filter. It is not stored or shared, and it is not added to the page link.

Related Tools

Tool available in other languages