Split CSV into parts
Cut a CSV into several smaller files of N data rows each, repeating the header in every part. Quote-aware: a record with a quoted field containing a literal newline stays one record. Runs entirely on your device.
Runs on your device. The file is never uploaded.
Split CSV into parts cuts a file into chunks of rowsPerFile data rows, 1000 by default, repeating the header on top of each. Parts are named stem.part001.csv onward, the counter padded to three digits or more, and each arrives as its own download. A header-only file is refused with the message no data rows after the header.
Questions
How does it decide where to cut?
By a fixed number of data rows, set with rowsPerFile, which defaults to 1000. The header is not counted, so 1000 means a thousand data rows per part plus the header on top. It must be a whole number of 1 or more. There is no way to split at a value change or a byte size here.
Does every part keep the header?
Yes, when hasHeader is on, which is the default. The first row is taken as the header and repeated at the top of every part, so each file opens correctly on its own. Turn hasHeader off and the first row is treated as data, with no header repeated anywhere.
What are the parts called?
Your file name, without the .csv, followed by .partNNN.csv, for example export.part001.csv, export.part002.csv. The counter is padded to at least three digits, more if the part count needs it, so the files sort correctly. They arrive as separate downloads, not as a zip, so you can take only the ones you want.
Will it split a record that spans several lines?
No. A quoted field containing a literal newline is one record and stays in one part. That is because the file is parsed with quote state tracked across the whole text rather than split on line breaks, so no part can begin or end inside a quoted value.
Why did it say there are no data rows?
Because after removing the header there was nothing left to split, or the file was empty to begin with. An empty file gets "file is empty, nothing to split", and a header only file gets "no data rows after the header". Turn hasHeader off if the file genuinely has no header row.
How large a CSV can it split?
There is no built-in limit, but the whole file is parsed into memory and every part is built in memory before you download it, so the peak use is roughly double the input size. Nothing is uploaded. For a file too large for a browser tab, split it with a desktop tool that can stream from disk.