FILTER CSV

Show only the rows you care about by typing a short expression, such as price above 10 and state equal to NY. The match count updates as you type. A filter is a view at first, so nothing is deleted until you choose to keep or remove the matching rows.

Zero retention: your files never leave this browser. Verify it yourself in DevTools.

Loading the CSV tools.

About Filter CSV

How Can You Verify That Your Files Never Leave This Browser?

You do not have to take our word for it. Browser developer tools list every request a page makes, so you can watch 2csv work and confirm that your data is never sent anywhere. The check takes about a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files (including the background file parser), its web fonts, and one anonymous page-view request. No file has been chosen yet, so none of them can contain your data.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Open a CSV file in the Filter CSV tool above, run it, and download the result.
  5. Look at the Network tab again. It is still empty. Reading, changing, and saving the file made no request at all. For extra proof, turn on offline mode after the page loads: every tool keeps working.

Your file is read into this tab's memory with the browser's own file reader, parsed and changed by code that is already on the page, and handed back to you as a download. It is never uploaded, never stored in the browser, and gone when you close the tab. The only other request the site can make is the feedback form, and only when you submit it.

The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint, so even a bug could not send your data elsewhere.

How Do You Write a Filter Expression?

A filter expression is a short rule that each row either passes or fails. It is a small language built for this page, not SQL. You name a column, an operator, and a value, then combine tests with AND, OR, NOT, and parentheses. An example: price > 10 AND state = "NY".

  • Comparisons: = != > >= < <=. Numbers compare as numbers, dates as dates, anything else as text ignoring case.
  • Text tests: contains, starts with, ends with, and matches for a regular expression written as /re/flags or in quotes.
  • Lists and blanks: in (NY, NJ), is empty, and is not empty. Put NOT before any test to reverse it.
  • Column names with spaces go in [square brackets] or backticks, and values with spaces go in quotes.

What Happens When You Type Plain Words?

If the bar holds plain words with no operator, the filter becomes a text search across every column. A row matches when all of the words appear somewhere in it, in any column and any order. Typing smith boston finds rows that mention both, which is often quicker than writing a full rule.

Is a Filter Permanent?

No, not at first. A filter is a view: the grid and the export bar show only the matching rows, and the export bar says that a filter is active. The rest of the table is still there, and clearing the filter brings every row back. To change the table itself, use one of the two buttons.

  1. Keep only matching rows deletes every row that does not match.
  2. Remove matching rows deletes the rows that do match and keeps the rest.
  3. Undo restores the table if you change your mind, for the last five changes.

Which Filters Come Up Most Often?

The example chips under the bar are built from your own column names, so they are ready to edit instead of typed from nothing. Common rules include finding rows where an email column is empty, keeping only one state or region, pulling orders above a dollar amount such as $1,250.00, and matching a pattern with a regular expression.

A filter also feeds other tools. The CSV splitter splits only matching rows when a filter is on, and Remove rows accepts a filter expression to delete rows that match it.

What Else Can You Do With a CSV Here?

  • CSV viewer: Open a CSV of any size, scroll every row, and see a profile of each column.
  • Sort CSV: Sort rows by one or more columns, as text, numbers, or dates, ascending or descending.
  • CSV validator: Find ragged rows, broken quotes, bad headers, encoding problems, and values of the wrong type.
  • Remove duplicates from CSV: Find and remove duplicate rows, comparing whole rows or only the columns you choose.
  • Trim CSV whitespace: Trim leading and trailing spaces, collapse double spaces, and drop invisible characters and empty rows.
  • Find and replace in CSV: Find text in one column or every column and replace it, with match case, whole cell, and regex options.
  • Remove rows from CSV: Delete rows by number or range, the first or last rows, empty rows, or rows that match a rule.
  • CSV editor: Edit cells, add or delete rows, and add, delete, rename, or move columns.
  • Split CSV column: Split one column into several at a delimiter, such as a full name into first and last.
  • Merge CSV columns: Join two or more columns into one with the separator you choose, skipping empty values.
  • CSV column type converter: Convert a column to clean numbers, ISO dates, true/false, or upper, lower, or title case.
  • CSV to JSON converter: Convert CSV to a JSON array of objects or arrays, or to JSON Lines, with typed values.
  • JSON to CSV converter: Convert a JSON array or JSON Lines to CSV, flattening nested objects into dotted column names.
  • CSV to SQL converter: Turn a CSV into SQL INSERT statements, with an optional CREATE TABLE, for PostgreSQL, MySQL, SQLite, or SQL Server.
  • CSV to TSV converter: Convert a comma-separated file to tab-separated values that paste cleanly into spreadsheets.
  • TSV to CSV converter: Convert a tab-separated file to a standard, properly quoted comma-separated CSV.
  • CSV splitter: Split a large CSV into smaller files of a set number of rows, with the header repeated in each.

All eighteen tools are on the 2csv home page, and once a file is open you can switch between them without reloading it. Part of the 2suite.io privacy-first ecosystem.

Frequently Asked Questions

Does the filter use SQL?

No. It uses a small expression language with comparisons, contains, starts with, ends with, regular expressions, in lists, is empty, AND, OR, NOT, and parentheses. SQL queries are not available.

How do I filter on a column name with spaces?

Put the name in square brackets or backticks, for example [Order Total] = 100. Put text values with spaces in quotes.

Does the export include filtered-out rows?

No. While a filter is active, exports contain only the matching rows, and the export bar says so. Clear the filter to export everything.

Is text matching case-sensitive?

No. Text comparisons and contains, starts with, and ends with ignore case. A regular expression can add its own flags.

Was this helpful?