How to split a large CSV into smaller files
There are two common ways to split a large CSV: by row count (say, 10,000 rows per file so it fits an import limit) or by a column value (one file per region, status, or salesperson). Splitting by row count is easiest from the command line. Splitting by column is what SheetSweep Split does in a few clicks.
Option 1: Split by row count (command line)
On Mac or Linux, in Terminal:
- Save the header:
head -n 1 big.csv > header.csv - Split the rest into 10,000-row chunks:
tail -n +2 big.csv | split -l 10000 - part_ - Add the header back to each piece:
for f in part_*; do cat header.csv "$f" > "$f.csv"; rm "$f"; done
On Windows, the simplest route is opening the file in Excel (if it's under Excel's 1,048,576-row limit), copying blocks of rows into new workbooks, and saving each as CSV. Be careful with quoted fields that contain line breaks; line-based tools like split can cut those rows in half.
Option 2: Split by column in Excel or Google Sheets
- Turn on a filter (Data > Create a filter in Google Sheets, Data > Filter in Excel).
- Filter the column to one value, copy the visible rows plus the header into a new sheet, and save it.
- Repeat for every value.
Fine for three or four values, painful for thirty.
Option 3: SheetSweep Split (Pro, nothing uploaded)
SheetSweep Split breaks a file into one file per value in any column.
- Open SheetSweep Split.
- Choose one CSV, TSV, XLSX, or XLS file, and pick a sheet if needed.
- Pick the group column. Each unique value becomes its own spreadsheet.
- Download one group, or a ZIP containing every split file.
Every file keeps the original headers and file format. Rows with an empty value in your chosen column go into a clearly labeled blank file, so nothing gets dropped. Your source file is never modified.
FAQ
Can SheetSweep split by a fixed number of rows?
Not today. Split works by column value. For fixed row counts, use the command-line method above.
How big a file can I split?
Pro handles files up to 25 MB.
Is Split free?
Split is part of Pro ($29/month), along with Merge, Compare, Bulk Clean, and batch Convert. See pricing.
Split your file
Need one file per region, team, or status? Try SheetSweep Split and get them all in one ZIP, without uploading anything.