Split CSV File
CSV Split Toolkit
Split one CSV into multiple smaller files, bundled as a ZIP. Two modes are supported: split by row count (for import targets with a maximum-rows-per-file limit), and split by column value (one output file per unique value, such as one file per country). Every part is a standalone, valid CSV with the original header row preserved. Runs entirely in the browser.
Before you start
You need a CSV with a header row. Then decide which shape of split you want:
- By row count: pick a number (e.g. 1000). You'll get
part-001.csv,part-002.csv, … each with that many data rows (plus the header). The last part may have fewer. - By column value: pick a column. You'll get one file per unique value in that column. File names are derived from the value (sanitised to safe characters).
If you go the column route, check the column's cardinality first — "country" on a global export is fine, "email" is going to produce one file per row and an unreadable ZIP.
How to use it
- Paste or drop your CSV in the left pane.
- Pick the split mode.
- Fill in either Rows (for row-count mode) or Column (for column-value mode). The other field is ignored.
- Click Split. The right pane lists every part that was produced and its row count.
- Click Download (ZIP) to save all parts as a single archive.
Modes explained
By row count
Chops the CSV into equal-sized chunks. Part order follows the input order. Typical uses: working around a 10k/50k-rows-per-import cap, splitting a huge file so each chunk fits in memory, parallelising a downstream process.
By column value
One output file per unique value in the chosen column. The value becomes the filename
(sanitised: spaces to underscores, unsafe characters dropped). Rows with an empty value in
that column go to _empty.csv. Typical uses: per-country exports, per-tenant
dumps, per-month archives if the file has a month column.
Example
Input (sales.csv, 5 rows):
id,country,amount
1,DE,100
2,FR,80
3,DE,40
4,ES,65
5,FR,200
Split by column country produces three files in the ZIP:
DE.csv— 2 data rowsFR.csv— 2 data rowsES.csv— 1 data row
Each has the header id,country,amount.
Tips & common pitfalls
- Check cardinality before splitting by column. A column with 50,000 unique values will produce 50,000 tiny files and a huge ZIP. Group the column first (e.g. by first letter or first-3-chars) if you still want a per-value split.
- Row-count mode preserves order. Column-value mode doesn't guarantee any particular row order within a part — rows are grouped by key, not by original position. Sort upstream if that matters.
- Empty cells in the split column land in
_empty.csv. Often these are rows you want to skip or fix. - Filename clashes can happen if two values only differ in characters that get sanitised (e.g.
"New York"vs"New_York"). The tool appends a suffix in that case; rename upstream if the parts need stable, meaningful names. - Very large CSVs: the whole input is parsed into memory to build the parts. If the file is pushing your RAM, split it in two passes — row-count first, then column-value on each part.
- Max part size with row-count: set "Rows" smaller than you think. 10 MB parts import much faster in typical admin tools than 100 MB parts.
Troubleshooting
The ZIP has one giant file and no splits.
You probably left the row count higher than the total number of rows, or the chosen column only has one unique value. The status bar tells you how many parts were produced.
The tool produced 40,000 files and now my browser is frozen.
That's the cardinality trap from the tips above. Pick a lower-cardinality column, or pre-aggregate in the source file.
Can I change the filename template?
Not yet. Row-count produces part-001.csv; column-value uses a sanitised version of the column value. Tell me if you want a specific pattern.
Frequently asked questions
Are headers preserved on every part?
Yes. Every output file is a standalone, valid CSV with the same header row as the source.
Does it handle quoted fields and embedded commas?
Yes. The splitter parses into rows via PapaParse first, then re-emits with correct RFC 4180 quoting.
Is anything uploaded?
No — parsing, splitting and zipping all happen in your browser. See the privacy policy.
What ZIP compression is used?
Standard DEFLATE, produced by JSZip. The resulting ZIP opens in every OS's built-in archive tool.