Skip to content
← Utility Tools

CSV Row Filter

Pick the rows you want, drop the rest — entirely in your browser

CSV Row Filter (Predicate-Based Row Selection)

Filtering rows of a CSV is the most common follow-up to opening one. Show me the rows where the status is open, or where the price is over 100, or where the email column matches a regex. Excel does it with AutoFilter and Google Sheets does it with FILTER formulas, but both require opening the file in a spreadsheet app first. This tool runs the same filters without leaving the browser, supports multiple predicates combined with AND or OR, and downloads the result as a new CSV with the original header.

How Predicates Work

A predicate is a single rule against a single column: status equals open, price greater-than 100, email contains @anthropic.com. Each predicate has a column picker, an operator picker, and a value field. The available operators depend on the inferred column type: text columns get equals, not-equals, contains, does-not-contain, starts-with, ends-with, matches-regex; numeric columns get all of those plus greater-than, greater-or-equal, less-than, less-or-equal and between (with two values). The is-empty operator works on any column. Multiple predicates are combined either all-must-match (AND) or any-must-match (OR), set as a global switch.

Use Cases for Quick Filtering

Customer-list segmentation: pull only the rows where the signup date is in the last 30 days. Sales-list pruning: keep rows where the deal stage is closed-won and the amount is over a threshold. Email-list cleanup: drop rows where the email column does not contain an at-sign. Log-file analysis: keep rows where the response code starts with 5. Survey-result slicing: extract only respondents in a specific region. The tool is fast enough that interactive trial-and-error is realistic — add a predicate, see the row count update, refine.

Regex Support and Safety

The matches-regex operator accepts a JavaScript regular expression (the same flavor browsers run natively). The expression is wrapped in new RegExp(value), with a safe-execute pattern that catches catastrophic-backtrack patterns by timing out after 100 milliseconds per row. Common regex use cases: extract rows where a column matches an email format, a UUID pattern, an internal SKU code, or a date format you do not want to depend on auto-parsing. The flags input lets you set i for case-insensitive, m for multiline.

Why Filter in the Browser Instead of in Excel

Excel's AutoFilter and Google Sheets' FILTER are good. They are also tied to opening the file in a heavyweight app, applying filters as a view (not as a transformed file), and remembering to copy-paste the filtered range out. The browser approach is one-click: filter, get a real CSV file back, ready to feed into the next pipeline step. It also avoids the Excel-specific bugs where leading zeros disappear, large integer IDs lose precision, and date columns get reformatted in unwanted ways. For one-shot filtering with a clear predicate in mind, this is the faster path.

Common follow-ups: CSV Cleaner to dedupe and normalize the filtered subset, CSV to SQL to load the subset into a database, CSV to Markdown Table if the filtered rows are headed for documentation, and JSON ↔ CSV Converter if the next step needs JSON instead of CSV.

Frequently Asked Questions

Is the CSV uploaded during filtering?+
No. The file is parsed by PapaParse 5.4 in your browser, filtered in memory, and the matched rows are offered as a download. Nothing is uploaded. The Network tab confirms zero requests during the filter operation.
Which operators are supported?+
Every column has equals, not-equals, contains, does-not-contain, starts-with, ends-with, matches-regex and is-empty, which compare the cell as text. Numeric columns also get greater-than, greater-or-equal, less-than, less-or-equal and between, which compare numbers (between accepts its bounds in either order). is-empty matches cells with nothing in them.
Can I combine multiple predicates?+
Yes. Add as many predicates as you need. A global switch sets the combination logic: AND (all predicates must match) or OR (any predicate must match). For more complex expressions (mixed AND/OR), apply predicates in two passes — filter once, then re-filter the result.
How does regex matching work?+
matches-regex builds new RegExp(value, flags) from your pattern and the small flags box next to it, then tests each cell. Useful flags are i (case-insensitive), m (multiline), s (dot matches newlines) and u (Unicode); g is ignored because each cell is tested once. An invalid pattern or flag stops the filter with an error message instead of silently matching nothing.
Does the column-type inference affect available operators?+
Yes. A column counts as numeric when every non-empty value is a number; plain numbers, commas as thousands separators (1,234.50), a leading currency sign ($, €, £, ¥), exponents and a trailing % are understood. Numeric columns get the five numeric operators on top of the text ones; mixed columns (numbers plus text such as n/a) stay text. Open Column types to set any column to number or text yourself: forced to number, cells that are not numbers simply never match a numeric comparison. European decimal commas (1.234,5) are not read as numbers.
Are the column comparisons case-sensitive?+
Text equality (equals, not-equals) is case-sensitive by default. Contains and starts-with are also case-sensitive. The matches-regex operator can be made case-insensitive with the i flag. A future option may add a global case-insensitive toggle for the text operators — for now, the regex flag is the workaround.
What is the maximum file size?+
There is no hard cap because filtering runs entirely in your browser memory. Files up to a few hundred megabytes work without issue on a modern laptop. Very large files (multi-gigabyte) may stall a single tab; in those cases split the file first, filter each piece, and concatenate the results.
Can I keep the original column order in the output?+
Yes. The output CSV has the same columns as the input, in the same order, with the original header row. Only the row set changes — columns are not added, removed, or reordered. Use CSV Cleaner if you need to drop or reorder columns after filtering.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service