CSV Column Extractor
Keep only selected columns and download a new CSV
CSV Column Extractor — what it does
Load a CSV, tick the columns worth keeping and download a new file containing only those fields, in the same left-to-right order they have in the source. Row order and values are untouched — this is a projection, not a transformation — so the output stays a faithful subset of the source that any spreadsheet or import routine will accept.
Worked example
A five-row staff export cut down to the three fields a payroll import needs. In the column list, name, email and salary were left ticked and department and start_date were deselected.
Input — contacts.csv
name,email,department,start_date,salary Ann Lee,ann.lee@example.com,Sales,2021-03-15,52000 Ben Ortiz,ben.ortiz@example.com,Engineering,2019-11-02,88000 Chloe Park,chloe.park@example.com,Sales,2023-06-01,47500 Dev Patel,dev.patel@example.com,Support,2020-01-20,41000 Emma Rossi,emma.rossi@example.com,Engineering,2022-09-12,91000
Output — selected-columns.csv
name,email,salary Ann Lee,ann.lee@example.com,52000 Ben Ortiz,ben.ortiz@example.com,88000 Chloe Park,chloe.park@example.com,47500 Dev Patel,dev.patel@example.com,41000 Emma Rossi,emma.rossi@example.com,91000
The page reports 5 rows · 3 columns. The download is always called selected-columns.csv and has no byte-order mark.
When this tool helps
- Cutting an export down to the handful of fields an import template accepts, instead of deleting columns by hand in a spreadsheet.
- Removing personal data such as phone numbers and addresses before sharing a dataset with an outside party.
- Producing a slim file for analysis when the original export carries eighty columns and you need six.
How to use it
- Choose the CSV file to open.
- Select the columns you want to keep.
- Process the file.
- Download the reduced CSV.
Accuracy, limits, and good practice
- Columns come out in source order, whatever order you ticked them in; if the destination needs a different sequence, run the result through the CSV Column Reorder tool afterwards.
- Fields containing commas or line breaks stay quoted in the output, which keeps the file parseable in Excel and in scripts.
- Dropping a column removes it from this copy only. Keep the original export until the downstream import has been confirmed.
Frequently asked questions
Does the header row survive?
Yes. The header is rewritten with only the selected column names, so the output opens as a normal CSV with labels intact.
What if two columns share a name?
Duplicate headers are ambiguous in CSV. Rename them first with the column renamer so the selection targets the field you mean.
How large a file can it handle?
Files of tens of megabytes are usually fine. The whole document is parsed in memory, so very large exports may need splitting first.
Does the order in which I tick columns change the output order?
No. Whatever order you click in, the selected columns are written in their original file order (name before email before salary here). To change the order itself, run the result through the CSV column reorder tool.
What happens if nothing is selected when I click Extract?
Nothing is produced: the status shows the invalid-input message and the download button stays disabled. All columns are pre-selected when a file loads, so this only happens after you deselect every entry.
Related tools on this site
- CSV Missing Value Cleaner — Remove incomplete rows or fill blank cells
- CSV Transposer — Swap CSV rows and columns and download the result
- JSON Merge Tool — Merge two JSON objects or arrays with multiple strategies
Further reading: Cleaning a CSV export before you import it anywhere · CSV, JSON, YAML, XML and Markdown Tables: When Each Fits and How to Convert
Everything above runs inside this page. CSV Column Extractor needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
CSV 欄位提取能做什麼
載入 CSV、勾選需要保留的欄位,即可下載只含這些欄位的新檔案,欄位維持原檔由左到右的順序。列的順序與內容完全不動——這是投影而非轉換——因此輸出仍是原始資料的忠實子集,任何試算表或匯入程式都能接受。
實際範例
五列的員工名單,只留下薪資系統匯整時需要的三個欄位:欄位清單裡保留 name、email、salary,取消 department 與 start_date。
來源:contacts.csv
name,email,department,start_date,salary Ann Lee,ann.lee@example.com,Sales,2021-03-15,52000 Ben Ortiz,ben.ortiz@example.com,Engineering,2019-11-02,88000 Chloe Park,chloe.park@example.com,Sales,2023-06-01,47500 Dev Patel,dev.patel@example.com,Support,2020-01-20,41000 Emma Rossi,emma.rossi@example.com,Engineering,2022-09-12,91000
得到:selected-columns.csv
name,email,salary Ann Lee,ann.lee@example.com,52000 Ben Ortiz,ben.ortiz@example.com,88000 Chloe Park,chloe.park@example.com,47500 Dev Patel,dev.patel@example.com,41000 Emma Rossi,emma.rossi@example.com,91000
頁面顯示 5 rows · 3 columns。下載檔一律叫 selected-columns.csv,開頭沒有 BOM。
什麼時候用得上
- 把匯出檔縮減成匯入範本接受的少數欄位,不必在試算表中一欄一欄刪。
- 在把資料交給外部單位前,先移除電話、地址等個資欄位。
- 原始匯出有八十欄、分析只需要六欄時,先產出精簡檔。
使用步驟
- 選擇要開啟的 CSV 檔。
- 勾選要保留的欄位。
- 執行處理。
- 下載精簡後的 CSV。
精確度、限制與實務建議
- 輸出欄位一律維持原檔順序,與勾選先後無關;目標系統需要不同順序時,再把結果交給 CSV 欄位重新排序工具處理。
- 含逗號或換行的欄位在輸出中仍會加上引號,確保 Excel 與腳本都能正確解析。
- 刪除欄位只影響這份副本。在下游匯入確認成功前,請保留原始匯出檔。
常見問題
標題列會保留嗎?
會。標題會改寫成只含所選欄位名稱,輸出仍是帶標題的正常 CSV。
如果有兩欄同名怎麼辦?
CSV 中重複標題本身就有歧義。請先用欄位改名工具區分,再回來選取你要的那一欄。
檔案可以多大?
數十 MB 通常沒問題。整份文件會在記憶體中解析,超大匯出檔建議先拆分。
勾選欄位的先後順序會影響產生的欄位順序嗎?
不會。不論點選順序為何,被勾選的欄位都依原檔順序寫回(這裡是 name、email、salary)。要調整順序,請把得到的檔案再交給「CSV 欄位重新排序」工具。
什麼都沒勾就按下提取會怎樣?
不會產生任何東西:狀態列顯示無效內容的訊息,下載按鈕維持停用。檔案載進來時所有欄位預設都是勾選的,所以只有把每個欄位都取消後才會遇到。
本站相關工具
延伸閱讀: 匯入之前先把 CSV 匯出檔清乾淨 · CSV、JSON、YAML、XML 與 Markdown 表格:各自適用的場合與轉換方法
以上步驟全部在這個頁面內完成,CSV 欄位提取 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。