Skip to main content

CSV Filter

Keep only the rows that match your chosen filter criteria, including text matches, exact values, or numeric comparisons.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Was this tool useful?

How does this tool work?

A data file often contains more records than the segment you need to inspect: products above a price threshold, customers in one city or rows with a missing field. CSV filtering keeps records matching one condition on a chosen column and produces a reusable copy. Every column of a retained record remains present in its original order, so reducing the number of records does not discard their context. This operation does not sort the table, remove duplicates or rewrite retained values. It creates a subset rather than cleaning the source automatically.

Choose a column by its exact heading or its position starting at 1. With the header option enabled, the first record provides names and stays outside filtering. Without headings, use a position. Repeated names select their first occurrence; positions also avoid ambiguity with numeric headings. The delimiter is detected from commas, semicolons, tabs and vertical bars. Quoted cells are read as CSV fields even when they span several physical lines, rather than being split into separate records.

Text conditions include contains, equals, starts with and ends with. They do not use regular expressions: search characters are literal. Surrounding spaces are ignored by default for comparison, not in the output. Case remains significant unless its option is enabled. Empty and not-empty tests do not require a search value. When trimming is disabled, a cell containing spaces is not empty. A missing field in a short record is treated as an empty value rather than shifting other columns.

Greater-than, greater-than-or-equal, less-than and less-than-or-equal comparisons require valid numbers, recognising decimal points or commas and supported thousands spaces. Empty or non-numerical cells never satisfy those comparisons, nor does an invalid comparison value. One condition applies per execution. Matching records are kept in full and retain input order. If none matches, a file with headings contains only its header. That is a legitimate empty data result, not necessarily a processing failure or evidence of a malformed CSV.

How to use this tool

  1. Identify the field that determines selection

    Paste or import the CSV or TSV and confirm whether it has headings. Choose the column containing the actual criterion rather than another field merely associated with the records you are seeking.

  2. Define a precise condition

    Select an operator and its value, except for empty or not-empty checks. Confirm that thresholds are numerical. For text searches, decide whether case and surrounding spaces should affect matching.

  3. Inspect the resulting subset

    Run the filter, review the retained-record count and inspect values near the threshold or text variants. Copy or export the selected table while keeping the original available for testing other conditions.

Use cases

Extract prices beyond a threshold

Retain products above a numerical limit for a pricing review while keeping their references, categories and other fields attached to each selected product record.

Find missing information

Isolate records where a required column is empty so they can be completed at source. Filtering identifies an absence; it does not infer which value belongs in the missing cell.

Build a geographical segment

Choose one city with text equality and ignore case when appropriate to group spelling-case variants, without rewriting the addresses and city names retained in the output.

Examples

Keep amounts strictly greater than 10

Using the second column and greater than 10 retains only A. C's empty cell is not converted into zero and does not qualify as a valid number. All other fields of A remain associated with its price.

Input

id;price
A;12.50
B;2.75
C;

Result

id;price
A;12.50

Match a city regardless of case and surrounding spaces

Equality with york, trimming enabled and case ignored keeps records 1 and 3. The first retained cell still contains its spaces and capital letter. These options normalise comparison rather than the values written to the output CSV.

Input

id;city
1; York 
2;London
3;york

Result

id;city
1; York 
3;york

Tips and best practices

  • To combine conditions with AND, filter a copy and apply the second condition to its result. Each pass narrows the subset further. This process does not implement an OR between the conditions.
  • A contains search with an empty search value matches every string. If you want missing fields, explicitly choose the empty operator instead of leaving the search text blank.
  • Currency symbols and annotations such as unknown are not automatically converted into numbers. Handle those exceptions separately so excluded records are not mistaken for amounts that simply fall below the threshold.

Frequently asked questions

Do equals and greater-than compare cells in the same way?

No. Equals compares text after the selected normalisations, while greater-than requires two interpretable numbers. Strings 1 and 1.0 remain different under text equality even though they can represent the same numerical quantity.

Why does a cell containing spaces fail the empty test?

When surrounding-space trimming is disabled, those characters form a non-empty value. Enable trimming when they are not meaningful to your comparison. The original cell text still remains unchanged in retained records.

Can I enter regular expressions or several filter rules?

The value field uses a literal search, and the interface applies one rule at a time. Characters such as .* do not become a pattern. Successive passes can implement AND, while OR conditions need a different approach.

Does a header-only result indicate an error?

No. It means no data record satisfies the selected condition. Check the operator, threshold, case settings and chosen field before deciding that the sought records are absent from the source export.

Related tools

Tools similar or complementary to this one.

Similar tools

Select the CSV columns you want to keep in the final result.

Data & spreadsheetsUse this tool

Sort CSV rows by a selected column in ascending or descending order.

Data & spreadsheetsUse this tool

Profile every CSV column with detected type, missing values, cardinality, and descriptive numeric statistics.

Data & spreadsheetsUse this tool
GuideBest practicesBeginner

Split a CSV or Excel table into smaller files

Discover when to split a large table by row count or by a column value, and how to preserve a useful structure in every output file.

29 August 20261 min