CSV Row Filter

Keep only the CSV rows matching a condition.

Input
CSV input
Output
Result
Options

Detected automatically unless you pick one.

About this tool


This keeps only the rows where a chosen column satisfies a condition, equals, contains, starts with, greater than, is empty, and so on. The header is always preserved, so the result is a valid CSV file.

It is the quick answer to "I only need the rows where status is active" without writing a script or opening a spreadsheet.

How to use it

  1. Paste or upload your csvDrop a file onto the input pane, use the file picker, or paste the text directly.
  2. Adjust the options if neededThe defaults suit most input; open Options to change the behaviour.
  3. FilterPress Filter, or use Ctrl+Enter (Cmd+Enter on macOS).
  4. Copy or downloadCopy the result, or download it as a .csv file.

Worked examples


Each example below is executed against this tool by the test suite, so what you see is what the tool actually produces.

Keep rows matching a value

Input

name,status
Alice,active
Bob,inactive
Carol,active

Output

name,status
Alice,active
Carol,active

Filtered where status equals "active". Two of three rows are kept.

What to watch for


The details that decide whether a conversion is correct, and where information can be lost without any error being raised.

Available tests
Contains, equals, does not equal, starts with and ends with operate on text. Greater than and less than compare numerically when both values are numeric and fall back to text comparison otherwise. Is empty and is not empty test for blank cells, treating whitespace-only as empty.
Case sensitivity is off by default
Text comparisons ignore case unless you turn that on, since "Active" and "active" usually mean the same thing in exported data.
Numeric comparison needs numeric values
Greater than and less than parse both sides as numbers. If either is not numeric, the comparison falls back to text ordering, where "10" is less than "9". Check your column contains clean numbers before relying on a numeric filter.
No matches is treated as an error
If nothing matches, you get an explanation rather than a file containing only a header, because an empty result is almost always a mistyped value or a case-sensitivity issue rather than the intended outcome.
One condition at a time
Filtering applies a single test. For multiple conditions, run the tool again on its own output, successive filters compose as a logical AND.

Limitations


  • Applies a single condition per run.
  • No regular expression or OR logic.
  • Processing happens in your browser, so very large inputs are bounded by available memory. Files above roughly 10 MB are handled but will feel slower, and multi-hundred-megabyte files are better suited to a command-line tool.

Questions


Can I apply several conditions?
One per pass. Run the tool again on the output to add another, which combines them as AND.
Why did my numeric filter behave oddly?
If the column contains any non-numeric value the comparison falls back to text ordering, where "10" sorts below "9". Clean the column first.
Why is no result an error?
Because a header-only file is rarely what you wanted. The error prompts you to check the spelling or case of the value.