⏷

CSV Row Filter

Keep CSV rows that match a selected rule

No file selected.

CSV Row Filter — what it does

Keep only the rows you want by choosing a column, a rule and a value. Rules cover contains, equals, starts with, ends with, greater than and less than, with an optional case-sensitive match, so text and numeric filtering are both handled in one pass over the file.

Worked example

Orders with a quantity above 10 picked out of an eight-row export: filter column qty, rule Greater than, value 10.

Input — orders.csv

order_id,region,product,qty,unit_price,order_date
1001,East,Notebook,12,3.50,2026-01-04
1002,West,Stapler,3,8.99,2026-01-04
1003,East,Notebook,5,3.50,2026-01-05
1004,North,Pen box,20,2.10,2026-01-06
1005,West,Notebook,7,3.50,2026-01-06
1006,East,Stapler,1,8.99,2026-01-07
1007,North,Pen box,15,2.10,2026-01-08
1008,West,Desk lamp,2,24.00,2026-01-08

Output — filtered.csv

order_id,region,product,qty,unit_price,order_date
1001,East,Notebook,12,3.50,2026-01-04
1004,North,Pen box,20,2.10,2026-01-06
1007,North,Pen box,15,2.10,2026-01-08

The status reads 3 matching rows. The download is always filtered.csv, keeps the original column order and has no byte-order mark.

When this tool helps

  • Extracting a single region, status or customer from a large export before sharing it.
  • Pulling every transaction above a threshold for review or approval.
  • Isolating rows whose reference code starts with a particular prefix.

How to use it

  1. Choose the CSV file.
  2. Select the column to filter on.
  3. Pick a rule and enter the comparison value.
  4. Process and download the filtered CSV.

Accuracy, limits, and good practice

  • Greater than and less than compare numerically, so a column stored with currency symbols or thousands separators will not filter as expected.
  • Case-sensitive matching is off by default, which is usually right for user-entered text and wrong for codes where case carries meaning.
  • Contains is the most forgiving rule when values have inconsistent spacing or punctuation around the term you are searching for.

Frequently asked questions

Can I apply two filters at once?

Run the tool twice, feeding the output of the first pass into the second. Successive filters combine as an AND condition.

How do I keep rows that do not match?

Invert the logic where you can — for example use starts with on the values you want — or filter, then diff against the original to get the remainder.

Does the header row survive filtering?

Yes. The header is always written to the output, even when no data rows match the rule.

What if the value is not a number when I use Greater than or Less than?

No rows match: the typed value is converted with the browser's Number() function, so text becomes NaN and every comparison is false. Thousands separators are stripped from the data (1,200 reads as 1200) but not from the value you type, so type 1200.

What does an empty value box match?

With Contains, Starts with or Ends with, every row; with Equals, only rows whose cell is empty; with Greater than or Less than, the empty box counts as 0, so Greater than keeps rows with a positive number.

Related tools on this site

Everything above runs inside this page. CSV Row Filter needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

CSV 資料篩選能做什麼

選定欄位、規則與比較值,就能只保留需要的資料列。規則涵蓋包含、等於、開頭為、結尾為、大於與小於,並可選擇是否區分大小寫,因此文字與數值篩選都能在同一次處理中完成。

實際範例

從八筆訂單中挑出數量大於 10 的列:篩選欄位 qty、規則「大於」、值填 10。

來源:orders.csv

order_id,region,product,qty,unit_price,order_date
1001,East,Notebook,12,3.50,2026-01-04
1002,West,Stapler,3,8.99,2026-01-04
1003,East,Notebook,5,3.50,2026-01-05
1004,North,Pen box,20,2.10,2026-01-06
1005,West,Notebook,7,3.50,2026-01-06
1006,East,Stapler,1,8.99,2026-01-07
1007,North,Pen box,15,2.10,2026-01-08
1008,West,Desk lamp,2,24.00,2026-01-08

得到:filtered.csv

order_id,region,product,qty,unit_price,order_date
1001,East,Notebook,12,3.50,2026-01-04
1004,North,Pen box,20,2.10,2026-01-06
1007,North,Pen box,15,2.10,2026-01-08

狀態列顯示 3 matching rows。下載檔一律叫 filtered.csv,欄位順序不變,開頭沒有 BOM。

什麼時候用得上

  • 在分享大型匯出檔之前,先抽出單一地區、狀態或客戶的資料。
  • 撈出所有超過門檻的交易,供覆核或簽核。
  • 篩出參考代碼以特定前綴開頭的資料列。

使用步驟

  1. 選擇 CSV 檔案。
  2. 選定要篩選的欄位。
  3. 選擇規則並輸入比較值。
  4. 執行處理並下載篩選後的 CSV。

精確度、限制與實務建議

  • 大於與小於是數值比較,若欄位存有貨幣符號或千分位逗號,篩選結果會不如預期。
  • 預設不區分大小寫,這對使用者輸入的文字通常正確,但對大小寫具有意義的代碼就不適用。
  • 當值的前後空白或標點不一致時,「包含」是最寬容、也最不容易漏掉資料的規則。

常見問題

可以同時套用兩個條件嗎?

把第一次的輸出再跑第二次即可,連續篩選等同於 AND 條件。

怎麼保留「不符合」的資料列?

盡量把邏輯反過來寫(例如改用「開頭為」指定要留的值),或先篩選再與原檔比對差異取得其餘資料。

篩選後標題列還在嗎?

在。即使沒有任何資料列符合規則,標題也一定會寫入輸出。

選「大於」或「小於」時,值不是數字會怎樣?

沒有任何列符合:填的值會經瀏覽器的 Number() 轉換,文字會變成 NaN,所有比較都不成立。資料裡的千分位逗號會被去掉(1,200 讀成 1200),但你填的值不會,所以請填 1200。

值欄位留空會符合什麼?

「包含」「開頭是」「結尾是」會符合每一列;「等於」只符合儲存格為空的列;「大於」「小於」則把空值當成 0,所以「大於」會留下數字為正的列。

本站相關工具

以上步驟全部在這個頁面內完成,CSV 資料篩選 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。