Filter CSV online by column rules

This tool filters CSV online: pick a column, choose a text, number or empty-cell rule, and keep or remove the rows that match. Paste CSV or open a UTF-8 file. The filter runs in your browser, and you copy or download the kept rows with the header on top.

Runs in your browser.
Your data stays on your device.

Paste CSV, or open a UTF-8 file.

Reading settings

Headers are retained and excluded from row counts. Columns are identified by position.

Auto-detect tries comma, semicolon, tab and pipe. Check the preview; choose a delimiter if columns look wrong. Exports use this delimiter.

2. Set your filter rules

Read your CSV to choose columns. Each run filters the original input.

3. Preview and save

No filtered result yet

Enable JavaScript to filter CSV.

Copy and download include all kept rows and the header, if selected.

How to filter a CSV file

  1. Load your data

    Paste CSV or open a UTF-8 file. Check the delimiter, header and input preview.

  2. Set filter rules

    Choose columns, operators and values. Keep or remove rows matching all or any rules.

  3. Preview and export

    Select Apply filters, inspect the kept rows, then Copy CSV or Download CSV.

Paste CSV into the box under Load your CSV, or select Open file to read a UTF-8 .csv, .tsv or .txt file. A file is read as soon as you choose it; for pasted text, select Read CSV. Input delimiter starts on Auto-detect, which tries comma, semicolon, tab and pipe. Leave First row is a header checked when the top row holds column names.

Each rule has a Column, an Operator and a Value. Columns are listed by number with their header name, so two columns with the same name stay apart. Add rule adds another rule, and Combine rules and Output rows set how the rules work together.

Good to know

Text and numeric comparisons

Text rules compare literal values. Number rules compare exact decimals without rounding large integers. Dates remain text.

Empty and missing fields

Empty cells, whitespace and missing fields are different. Choose Is empty, Is blank or Is missing to match the fields you need.

Preserved values, normalized CSV

Exports keep every selected field and the original row order. CSV quoting and record endings are normalized. Details are below.

Example: keep the active rows

Load example fills the box with a header and four rows: Ada, active, 15; Lee, inactive, 9; Zoë, active, 10; and Sam, active, 27. It reads them with the comma delimiter and adds one rule. Set that rule to Column 2, Text equals and active, then select Apply filters. The counts read 4 input rows, 3 matched, 1 removed and 3 kept, and Lee's row is gone.

Add a second rule on Column 3 with Number greater than or equal and 15. With All rules must match (AND), only Ada and Sam are left. Switch Combine rules to Any rule can match (OR), and Zoë is back, because her status still matches.

Set Output rows to Remove matching rows to turn the result around: the first rule alone then keeps only Lee. Case sensitive text comparisons is on at the start, so the value ACTIVE matches no row until you turn it off.

Text, number and empty-cell rules

Text rules compare the cell as written: equals, does not equal, contains, does not contain, starts with and ends with. Spaces count, and accents stay distinct, so Zoë and Zoe differ. With case sensitivity off, both sides are lowercased first.

Number rules read the cell as an exact decimal, so 1e3 and 1000.00 both equal 1000. The value 9007199254740993 stays greater than 9007199254740992, although a standard 64-bit float rounds the two to the same number. Spaces around a number are ignored. A value such as 1,000 or a date is not a number: as a rule value it stops with an error, and in a cell it never matches, even for Number does not equal.

Is empty matches a field that is present and holds nothing. Is blank also matches a field of spaces. Is missing matches a short row with no field at that position, and Is present matches any field that exists.

What the download keeps

Kept rows stay in their original order with every field intact: leading zeros such as 00123, quoted delimiters, line breaks inside quotes and characters such as 東京. A row with more or fewer fields than the header keeps its own count. With the header option on, the header row is always the first line, even when no row matches.

The export wraps every field in double quotes and separates records with CRLF. It is UTF-8 without a byte order mark and uses the input delimiter, so a semicolon file stays semicolon-separated. A tab-separated input downloads as filtered.tsv, and any other input as filtered.csv. Formula-like values such as =SUM(A1:A2) are saved as written, so a spreadsheet may run them when it opens the file.

Text pasted into the box uses LF line breaks inside quoted fields. Open the file itself when a quoted field must keep a CRLF break.

Limits

The filter keeps or removes whole rows and nothing else. It does not sort, edit cells, drop columns, remove duplicates or group values. Rules use literal text and exact numbers only: there are no regular expressions, wildcards, formulas or SQL queries. Dates are text, so filter one month with Text starts with and a value such as 2024-05.

It reads UTF-8 text only: a file in another encoding stops with an error, and so does a quoted field that never closes. The tool sets no cap on rows or file size. In a Node check of the same code, 1,000,000 rows of 3 columns were filtered by two rules, keeping 14,286. Browser memory sets the real limit, and a run past it stops with an error.

Cancel stops a run and clears the rules and results, and your input stays. The preview shows 25 rows and 8 columns at a time; copy and download include every kept row.

Questions

How do I filter a CSV file by a column value?

Read the CSV, then set the rule's Column to the column you need, Operator to Text equals and Value to the exact text, such as active. Select Apply filters, and only rows whose cell in that column equals the value stay. For amounts or counts, choose a Number operator instead.

Can I combine rules with AND or OR?

Yes: select Add rule as many times as you need. With All rules must match (AND), a row stays only when every rule matches it. With Any rule can match (OR), one matching rule is enough. Each run of Apply filters starts again from your original input, not from the last result.

What is the difference between sorting and filtering?

Filtering decides which rows stay; sorting decides the order they appear in. This tool only filters, and the kept rows keep their original order. To order them by a column, download the result and open it in CSV Sort, which sorts rows by text or by exact numbers.

How are empty, blank and missing cells different?

Is empty matches a field that exists and holds nothing. Is blank also matches a field of spaces or other whitespace. Is missing matches a short row with no field at that position. In a check, a column with one empty field, one single space and one short row matched 1, 2 and 1 rows.

What happens when no rows match?

With Keep matching rows, the result is the header row alone when First row is a header is checked, or an empty file when it is not. With Remove matching rows, every row stays. The counts line shows the numbers, and the status message says when no data rows remain.

Is my CSV uploaded?

No. The text or file is read and filtered by a worker in your browser, and nothing is uploaded or stored. Copy puts the result on your clipboard only when you select it. Reset clears the input, rules and result, and leaving the page clears them too.