Split CSV file

Choose a CSV file or paste one, then split it every N rows or into one file per distinct value of a column. Every part gets the header row, quoted fields with commas or line breaks stay intact, and all parts download together as a .zip. Nothing is uploaded.

Frequently asked questions

Does each file keep the header?

Yes. The first row is treated as the header and repeated at the top of every part.

How do I split a CSV on the command line?

On Linux or macOS: tail -n +2 big.csv | split -l 1000 - part_ then add the header back to each part with for f in part_*; do (head -n 1 big.csv; cat "$f") > "$f.csv"; rm "$f"; done. That counts lines, so a quoted field containing a line break can be cut in two; this tool splits by records.

How large a file can it handle?

It runs in your browser's memory, so files of tens of megabytes are fine on a normal laptop. Very large files (hundreds of MB) are better split with the command above.

Is my data sent to a server?

No. The file is read by your browser; the page has no analytics and makes no network requests with your input.