Split CSV by Column
Create separate CSV files for each field value
Split CSV by Column — what it does
Choose a column and the tool creates one CSV per distinct value in it, each containing only the matching rows, all packed into a ZIP. A combined export becomes a file per region, per salesperson or per month in a single step, with the header preserved in every output.
Worked example
An eight-row order export split into one file per region; the region column was selected.
Input — orders.csv (split column: region)
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 — split-csv-files.zip, three files
East.csv order_id,region,product,qty,unit_price,order_date 1001,East,Notebook,12,3.50,2026-01-04 1003,East,Notebook,5,3.50,2026-01-05 1006,East,Stapler,1,8.99,2026-01-07 West.csv order_id,region,product,qty,unit_price,order_date 1002,West,Stapler,3,8.99,2026-01-04 1005,West,Notebook,7,3.50,2026-01-06 1008,West,Desk lamp,2,24.00,2026-01-08 North.csv order_id,region,product,qty,unit_price,order_date 1004,North,Pen box,20,2.10,2026-01-06 1007,North,Pen box,15,2.10,2026-01-08
Files are named after the value and the ZIP is always split-csv-files.zip; the status reads 3 CSV files created. Unlike the row splitter, these parts have no byte-order mark, and the split column is kept in every part.
When this tool helps
- Sending each branch or account manager only the rows that belong to them.
- Separating a consolidated report back into per-department files for distribution.
- Producing one file per status or category so each can be processed by a different workflow.
How to use it
- Choose the CSV file.
- Select the column to split on.
- Process the split.
- Download the ZIP of per-value files.
Accuracy, limits, and good practice
- Split on a column with a manageable number of distinct values; splitting on an ID column produces one file per row.
- Values that differ only in case or spacing create separate files, so normalise the column first if the source was typed by hand.
- Filenames come from the column values, so characters that are illegal in filenames are adjusted in the output names.
Frequently asked questions
How many files will I get?
One per distinct value in the chosen column. Run the column statistics tool first to see the unique count before splitting.
Do the parts keep the header?
Yes, every file gets the full header row, so each opens independently in any spreadsheet or importer.
What happens to blank values?
Rows with an empty value are grouped into their own file, which makes uncategorised records easy to spot.
What file name does a value such as Sales/EMEA or New York get?
Characters that are not allowed in file names (\ / : * ? " < > |) are replaced with a hyphen and runs of spaces become one hyphen, so Sales/EMEA becomes Sales-EMEA.csv and New York becomes New-York.csv. Names are cut at 80 characters.
What if two values end up with the same file name?
Each later group gets a numbered suffix instead of replacing the earlier file, and the check ignores letter case. Splitting a team column holding Sales/EMEA, Sales-EMEA, East, east, 'East ' and a blank gives Sales-EMEA.csv, Sales-EMEA-2.csv, East.csv, east-2.csv, East-3.csv and blank.csv — six files, and the status reads 6 CSV files created.
Related tools on this site
- CSV File Difference — Compare two CSV files by a key column and export differences
- CSV Sorter — Sort CSV rows by a text, number, or date column
- JSON Flattener — Convert nested JSON into flat key-value paths
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. Split CSV by Column needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
依欄位拆分 CSV能做什麼
選定一個欄位,工具會依該欄的每個不重複值各產生一份 CSV,只包含對應的資料列,並統一打包成 ZIP。一份彙總匯出檔,一步就能變成依地區、依業務或依月份分開的檔案,且每份都保留標題列。
實際範例
八筆訂單依地區各拆成一個檔案;選的是 region 欄。
來源:orders.csv(拆分欄位:region)
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
得到:split-csv-files.zip,內含三個檔案
East.csv order_id,region,product,qty,unit_price,order_date 1001,East,Notebook,12,3.50,2026-01-04 1003,East,Notebook,5,3.50,2026-01-05 1006,East,Stapler,1,8.99,2026-01-07 West.csv order_id,region,product,qty,unit_price,order_date 1002,West,Stapler,3,8.99,2026-01-04 1005,West,Notebook,7,3.50,2026-01-06 1008,West,Desk lamp,2,24.00,2026-01-08 North.csv order_id,region,product,qty,unit_price,order_date 1004,North,Pen box,20,2.10,2026-01-06 1007,North,Pen box,15,2.10,2026-01-08
檔案以欄位值命名,ZIP 一律叫 split-csv-files.zip;狀態列顯示 3 CSV files created。與按行數拆分不同,這些分檔開頭沒有 BOM,而且拆分欄位在每個分檔裡都保留。
什麼時候用得上
- 只把屬於各分店或各業務的資料寄給對應的人。
- 把彙總報表拆回各部門檔案以便分送。
- 依狀態或分類各產生一份檔案,交給不同流程處理。
使用步驟
- 選擇 CSV 檔案。
- 選定作為拆分依據的欄位。
- 執行拆分。
- 下載依值分檔的 ZIP。
精確度、限制與實務建議
- 請挑不重複值數量合理的欄位;用識別碼欄位拆分會變成一列一個檔案。
- 只差在大小寫或空白的值會被分成不同檔案,若來源為手動輸入,建議先統一格式。
- 檔名取自欄位值,因此不允許出現在檔名中的字元會在輸出名稱中被調整。
常見問題
會產生幾個檔案?
依所選欄位的不重複值數量而定。拆分前可先用欄位統計工具查看不重複值有幾個。
各檔案都有標題嗎?
有,每份都會寫入完整標題列,可獨立在任何試算表或匯入程式中開啟。
空白值怎麼處理?
值為空的列會集中成獨立一份檔案,方便找出尚未分類的紀錄。
像 Sales/EMEA 或 New York 這種值會得到什麼檔名?
檔名不允許的字元(\ / : * ? " < > |)會被換成連字號,連續空格也併成一個連字號,所以 Sales/EMEA 變成 Sales-EMEA.csv、New York 變成 New-York.csv。名稱最長 80 個字元。
兩個值算成同一個檔名會怎樣?
後出現的那組會加上編號後綴,不會蓋掉前面的檔案,而且判斷時不分大小寫。以含有 Sales/EMEA、Sales-EMEA、East、east、「East 」與空白的 team 欄拆分,會得到 Sales-EMEA.csv、Sales-EMEA-2.csv、East.csv、east-2.csv、East-3.csv 與 blank.csv 共六個檔案,狀態列顯示 6 CSV files created。
本站相關工具
- CSV 檔案差異比較 — 依鍵值欄位比較兩個 CSV 並匯出差異
- CSV 排序工具 — 依文字、數字或日期欄位排序 CSV 資料
- JSON 扁平化 — 將巢狀 JSON 轉換成扁平鍵值路徑
延伸閱讀: 匯入之前先把 CSV 匯出檔清乾淨 · CSV、JSON、YAML、XML 與 Markdown 表格:各自適用的場合與轉換方法
以上步驟全部在這個頁面內完成,依欄位拆分 CSV 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。