data tool

CSV splitter

Split a large CSV into numbered parts of a set number of rows, or into one file for each value in a column, such as one file per office or per answer, with the header row repeated in every part. The file is split inside this page and the parts download together as a zip.

Loading the tool…

How it works

  1. 1

    Choose the CSV

    The tool detects whether it is comma, semicolon, tab or pipe separated and counts the rows.

  2. 2

    Pick a split mode

    By number of rows for import limits, or by a column's values to separate groups.

  3. 3

    Check the plan

    The table lists every part and how many data rows it holds before anything is saved.

  4. 4

    Download the zip

    All parts download in one zip, each a complete CSV with the header row at the top.

Two ways to split

Splitting by rows answers a practical limit: an email tool that imports 10,000 contacts at a time, a spreadsheet that slows down past a certain size, or an upload form with a file cap. Set the rows per part and the file is cut into numbered parts in order. Splitting by a column answers a different need: sending each region its own list, or giving each team only their rows. Pick the column and every distinct value becomes its own file, named after the value so the files are easy to hand out.

The header in every part

A CSV without its header row is hard to use, because nobody knows what the columns mean, and many importers expect the first line to be the column names. With the header option on, the first row of the original is copied to the top of every part, and row counts in the plan count data rows only. Turn it off for files that have no header, such as raw exports from older systems; splitting by a column needs a header, so the column can be named and each file kept readable.

Splitting form responses by an answer

A form that runs across several branches, events or programs collects every response in one export. Splitting that export by the branch or event column gives each manager a file with only their responses, with no manual filtering in a spreadsheet. The form builder exports responses as CSV, one column per question, with radio and dropdown answers written as their option labels, so splitting on a question column produces one file per option chosen.

Quoting kept to RFC 4180

Fields that contain a comma, a quote or a line break are wrapped in double quotes in a CSV, with inner quotes doubled. That is the convention RFC 4180 describes, and the parser here follows it, so an address with commas or a comment with line breaks stays in one field. When the parts are written, any field that needs quoting is quoted again the same way, so each part reads back exactly as the original would.

File names from values

When splitting by column, each value becomes a file name: lowercase, with anything that is not a letter or number turned into a hyphen, so Brisbane / North becomes brisbane-north. Blank values go into a file called blank. If two values tidy to the same name, the second gets a number on the end. The plan shows every name before you download, so nothing is overwritten by surprise.

After splitting

Spot check a part or two in a spreadsheet or the CSV to table tool: the header should be on the first line, the row counts should add up to the original, and a column with commas inside values should still line up. If you later need the parts back together, the merge CSV files tool joins them, matching columns by name.

Limits

  • The whole file is read into memory, so the practical size limit is your device's memory, usually several hundred megabytes on a computer.
  • The delimiter is detected from the first lines. A file that mixes delimiters needs cleaning first.
  • Values in a split column are matched exactly after trimming spaces, so Perth and perth become two files.
  • Line endings in the parts are Windows style, which every spreadsheet and most importers accept.

What it does not do

  • It does not change any values.
  • It does not output Excel files.
  • It does not upload the file.

Questions people ask

How do I split a big CSV file?

Choose the file here, set the number of rows per part, and download the zip. A 95,000 row file split at 20,000 rows gives five parts: four of 20,000 and one of 15,000, each with the header. The work happens in the browser, so the data stays on your device.

Does each part keep the header row?

Yes, when the first row is a header, which is the default. The header is copied to the top of every part so each file can be opened or imported on its own. Turn the option off only if the original file has no header row at all.

Can I split a CSV by a column value?

Yes. Choose split by a column's values and pick the column. Each distinct value becomes its own file with all the rows that have it. This is the quick way to send each office, team or event its own list from one combined export.

What is the largest CSV this can split?

It depends on your device's memory, because the file is read whole. On a typical computer, files of a few hundred megabytes split comfortably; phones manage less. If the tab stalls, splitting the file once into two halves with a text editor or a command line tool first helps.

Will Excel open the parts correctly?

Yes for most files. If the original was UTF-8 with accents and Excel shows garbled letters, open the part through Excel's data import and choose UTF-8, or convert it with a byte order mark. Leading zeros in codes are kept as text in the CSV but Excel may drop them on opening.

Collect responses you can split by answer

Take what you made here into forms.

Create a form with OneCraft

More tools like this

Sources

Written and checked by the OneCraft team. Last checked .