mygems

Split a CSV file

One file too big to use, as several that are not.

  • By rows, files or column
  • Header on every file
  • One .zip download
  • Nothing uploaded

1.Open the file

CSV or TSV. Drag it here, or choose a file.

Why it exists

A CSV usually needs splitting because something downstream has a limit: an import that takes 10,000 rows, an email attachment cap, Excel's million-row ceiling. Or because one file holds what should be several, one per region or per customer. Both are the same job, and both need every piece to keep the header row, which is the part that splitting a file by hand usually gets wrong.

What it does

  • Splits into files of a fixed number of rows, or into a fixed number of equal files.
  • Or writes one file per distinct value of a column, named after the value.
  • Repeats the header row at the top of every file, and keeps rows in their original order.
  • Lists the files and their row counts before writing anything, then downloads them as one .zip.

Rows, not bytes

The pieces are cut at row boundaries, never in the middle of a record, which matters when a field contains a line break inside quotes. A byte-based splitter cuts there happily and produces two broken files.

Questions

Does every file keep the header row?
Yes. Each piece is a complete CSV with the original header as its first line, so any of them can be opened or imported on its own.
Can I split by a column, like one file per country?
Yes. Pick the column and each distinct value gets its own file, named after the value, with blanks collected into one file of their own. The limit is 1,000 files, which keeps an accidental split on an ID column from producing thousands of one-row files.
How large a file can it split?
As large as the browser tab can hold in memory, which on a desktop is usually several hundred megabytes. On a phone the ceiling is far lower, and the tool warns you before it tries.