Skip to content

Free · Browser-local tools

Filter CSV rows online

Filter CSV by column values, text or numbers. Combine conditions, preview matching rows and download a filtered CSV. Free, with no signup or file upload.

Filter CSV

Start with your CSV

Open your file in the CSV editor with this tool already selected. Preview the result before downloading.

  1. Choose a CSV or TSV file.
  2. Add column conditions and preview matching rows.
  3. Download the filtered CSV or apply with undo.

Free · No signup · File contents stay in your browser.

Try a small example

3 records · 3 columns
Illustrative CSV sample data
idnameamount
1Example one12
2Example two24
3Example three18

Keep rows where amount is greater than 15

Keep rows where amount is greater than 15
idnameamount
2Example two24
3Example three18

Illustrative fictional data. Open the sample to try the tool.

How to filter csv

  1. 1

    Choose a CSV or TSV file.

  2. 2

    Add column conditions and preview matching rows.

  3. 3

    Download the filtered CSV or apply with undo.

What to expect

Combine up to 20 text, empty-value and numeric conditions with AND or OR. Matching rows keep source order; download includes all matching rows, not just the preview.

Local files and clear limits

These tools process file contents on your device. The browser workspace accepts files up to 1 GiB and 5 million records, subject to available browser storage and decoded-record limits. This tool's calculations support up to 100,000 records, 2 million cells and 64 MB of text. Download a new copy to keep your result.

Plain answers

Filter CSV questions

Can I combine CSV filter conditions with AND or OR?

Combine up to 20 text, empty-value and numeric conditions with AND or OR. Matching rows keep source order; download includes all matching rows, not just the preview.

Does my CSV leave my device?

File selection, editing and these task operations run in your browser. Optional recipe assistance, when available, sends your goal and only the column metadata or sample values you explicitly include to its configured provider. Your file is not attached automatically; see Privacy for processing details. Manual editing requires no account or file upload. Download a new copy to keep your result; refreshing restores the original input, not unsaved edits.

Do the editor and task have the same file limits?

The editor opens files up to 1 GiB and 5 million records, subject to browser storage and decoded-record limits. This task supports up to 100,000 records, 2 million cells and 64 MB of decoded text.

Other ways to work with your CSV

Use these local examples when you prefer a script or SQL. They create separate results and explain where their behavior differs from this browser tool.

Filter CSV records with Python

Writes active records with a finite amount of at least 10, in their original order. Change and to or for an OR filter.

Before you start

  • Python 3.10 or later. Run in a working folder with a backup of your source; output files may be replaced unless opened in exclusive mode.
  • Place input.csv in that folder. Examples use UTF-8, a comma delimiter and a header row. Column-specific recipes use id,label,amount,status,note; adapt names to your file.
Run the complete Python example
python3 - <<'PY'
import csv

with open("input.csv", encoding="utf-8-sig", newline="") as source:
    table = list(csv.reader(source, strict=True))
if not table:
    raise ValueError("Expected a header row")
headers, rows = table[0], table[1:]
if any(len(row) != len(headers) for row in rows):
    raise ValueError("Every record must match the header width")

from decimal import Decimal, InvalidOperation

amount_column = headers.index("amount")
status_column = headers.index("status")
def matches(row):
    try:
        amount = Decimal(row[amount_column])
        return amount.is_finite() and amount >= 10 and row[status_column] == "active"
    except InvalidOperation:
        return False

rows = [row for row in rows if matches(row)]

with open("output.csv", "w", encoding="utf-8", newline="") as target:
    writer = csv.writer(target)
    writer.writerow(headers)
    writer.writerows(rows)
print(f"Wrote {len(rows)} records to output.csv")
PY

Limits and output

  • CSV has no stored type schema. Python keeps fields as strings until an example explicitly converts a value. These recipes do not add spreadsheet formula protection; import sensitive-looking strings as text in spreadsheets.
  • This recipe retains the parsed table in memory; use a streaming approach for files that do not fit.

Documentation: Python CSV reader and writer

Use DuckDB for CSV filter

Run SQL locally with the DuckDB command line. Read fields as text, then cast only the columns used in calculations.

Before you start

  • Install the DuckDB command-line client using its official installation guide.
  • Run beside input.csv. Named-column examples expect id,label,amount,status,note.
Run DuckDB SQL
duckdb <<'SQL'
CREATE VIEW source AS SELECT * FROM read_csv('input.csv', header = true, all_varchar = true, force_not_null = ['id', 'label', 'amount', 'status', 'note']);
COPY (SELECT * FROM source WHERE status = 'active' AND TRY_CAST(amount AS DECIMAL(18, 4)) >= 10) TO 'duckdb-output.csv' (HEADER, DELIMITER ',');
SQL

Limits and output

  • Adapt column names and casts to your input. DECIMAL(18,4) rounds to four fractional digits; values outside its range become NULL with TRY_CAST. SQL output order is not promised without ORDER BY; equal sort keys need an explicit tie-breaker for a deterministic order.
  • These recipes write ordinary CSV without spreadsheet formula protection.

Documentation: DuckDB CSV options and installation; DuckDB COPY export

Use ClickHouse Local for CSV filter

Use the ClickHouse binary in local mode; no database server or upload is needed for these local file paths.

Before you start

  • Install ClickHouse using its official instructions so clickhouse is on PATH.
  • This explicit example schema is id,label,amount,status,note. Change every column name/type to match your header before running. Use a fresh folder or remove only a previous example output before repeating it.
Run ClickHouse Local SQL
clickhouse local --multiquery <<'SQL'
CREATE TABLE source ENGINE = Memory AS SELECT * FROM file('input.csv', CSVWithNames, 'id String, label String, amount String, status String, note String');
SELECT * FROM source WHERE status = 'active' AND toDecimal64OrNull(amount, 4) >= 10 INTO OUTFILE 'clickhouse-output.csv' FORMAT CSVWithNames;
SQL

Limits and output

  • The example loads a Memory table, so it must fit in available memory. All source fields are explicitly String to retain identifiers; numeric casts use fixed scale 4. CSVWithNames writes a header and ClickHouse quoting. Sorting equal keys and un-ordered queries do not guarantee original row order.
  • Output is ordinary CSV without spreadsheet formula protection. A remote ClickHouse server reads its own filesystem; these commands intentionally use local mode.

Documentation: ClickHouse Local and installation; ClickHouse CSV formats