CSV Splitter

One oversized export goes in, several usable files come out. Say how many rows belong in each piece or how many pieces you want, and the header is written at the top of every one. The cutting happens in this tab, so no file is uploaded and no counter is ticking down.

Need to filter or sort the rows before you cut them up? Open the app

Nobody splits a file for fun

The file itself is fine. Something waiting downstream of it is not, and the list of somethings turns out to be short:

  • A spreadsheet that stops counting. Excel worksheets hold 1,048,576 rows. Hand one a longer file and it loads the first million-odd rows and tells you the file was not loaded completely, which is polite for "the rest is missing". Google Sheets has its own cell budget and gives up in the same spirit.
  • Import forms with row caps. Mailing tools, CRMs, ad platforms, payroll portals and payment processors all publish a per-upload limit, and the error message never says which row it stopped at. Chunks that fit under the cap are the entire fix.
  • Work that has to be shared out. Six people cannot annotate the same file. Six files of equal length, one each, and the merge at the end is a concatenation.
  • Batch jobs that fall over. A loader that times out or exhausts memory on one enormous file usually walks through twenty smaller ones without complaint, and a failure costs you one part instead of the whole run.
  • Attachment limits. Email gateways and ticket systems bounce big files, and so do plenty of SFTP partners with a ceiling written into the contract.

The advice people are usually given is to open the thing in a text editor and cut it in half by hand. That works exactly once, and every piece after the first arrives with no column names on it.

Worked example: seven rows, three per part

Small enough to check by eye. Here is orders.csv:

order_id,customer,region,total
1001,Ada,EU,120.50
1002,Grace,US,88.00
1003,Alan,UK,240.00
1004,Katherine,US,15.75
1005,Edsger,EU,310.20
1006,Barbara,US,64.00
1007,Radia,IN,199.99

Leave the mode on Rows per part, type 3, and the download is orders-parts.zip holding three files. orders-1.csv:

order_id,customer,region,total
1001,Ada,EU,120.50
1002,Grace,US,88.00
1003,Alan,UK,240.00

orders-2.csv:

order_id,customer,region,total
1004,Katherine,US,15.75
1005,Edsger,EU,310.20
1006,Barbara,US,64.00

And orders-3.csv, holding the remainder:

order_id,customer,region,total
1007,Radia,IN,199.99

Four points worth taking from that. The header line appears three times, once per file, so part 3 is as openable as part 1. The 7 divided by 3 remainder lands in the last part rather than being padded out or dropped. Values are untouched: 120.50 keeps its trailing zero and 88.00 does not become 88, because the cells are moved as text and never reinterpreted as numbers. And the parts are named after the file you started with, numbered in the order the rows appeared.

Above the download the widget prints the same arithmetic back at you: 7 data rows, 3 parts, up to 3 rows per part, header repeated in every part. A preview of part 1 sits underneath it so you can confirm the columns landed where you expected before saving anything.

Two ways to say where the cuts go

The Split by control offers Rows per part and Number of parts. Which one you want depends on where the constraint lives.

  • Rows per part is for a limit someone else set. A spreadsheet that stops at 1,048,576 rows, an importer that refuses more than 10,000 at a time, a partner who asked for batches of 5,000. Type their number and stop thinking about it. The box starts at 100,000, which clears most import caps and opens instantly in any spreadsheet.
  • Number of parts is for a limit you set. Four analysts, four files. The rows are divided as evenly as whole numbers allow, so the last part is the one that comes up short. This mode starts at 2.
  • Typing is forgiving. Commas, underscores and stray spaces are stripped before the number is read, so 1,000,000 and 1000000 mean the same thing. Anything that is not a whole number of at least 1 falls back to the default, and the widget says it did rather than pretending you typed something sensible.
  • Asking for more parts than you have rows is capped at one row per part, with a note. A seven-row file requested as 20 parts comes back as 7 parts.

What happens between the drop and the download

No step in this list involves a network request. The whole sequence runs inside the page:

  • The text is read and the separator is worked out from the content. Comma, semicolon, tab and pipe are all recognised, which covers the semicolon files that European Excel installs write by default.
  • The first line is set aside as the header. Blank lines are discarded. Rows carrying a different number of fields to the widest row are padded, and the count of padded rows is reported rather than hidden.
  • The remaining rows are cut into consecutive slices of the size you asked for. Sequence is preserved throughout, so part 1 holds the first rows of the file in their original order and part 9 holds a later stretch. Nothing is sorted, sampled or shuffled.
  • The header line is written back on top of every slice.
  • One slice comes back as a plain CSV. Two or more are packed into a zip that is built in the tab, which is why the download appears without a round trip to a server.
  • Names follow the input. sales.csv yields sales-1.csv, sales-2.csv and so on inside sales-parts.zip. Rows pasted into the box instead of uploaded are named data.

Gotchas worth knowing

  • The parts are always comma separated. A semicolon or tab file is read correctly and written back out with commas. If the delimiter has to survive the trip, run the parts through the delimiter changer afterwards.
  • 500 files is the ceiling. Request a split that would go past it and the parts are made bigger until the count fits, with a message naming the new size. Six thousand rows asked for at one row each come back as 500 files of 12 rows.
  • A header with nothing under it is an error, not an empty zip. The widget says the file has a header row and nothing to split, which is more useful than handing you a zip of one empty file.
  • Quoted fields survive intact. A cell holding a comma, a line break or an escaped quote stays one cell, and it is re-quoted correctly on the way into whichever part it belongs to.
  • The invisible marker at the start of Excel exports is removed. Left in place it attaches itself to the first column name, and that bug tends to survive several rounds of debugging because the header looks perfectly normal on screen.
  • 100 MB is where this page stops. No row limit under that, and no metering of any kind. Past it the browser tab is the wrong place to be doing this, and the widget offers the full editor, which streams the file rather than holding it all at once.

Frequently Asked Questions

Excel will not open my CSV. Will splitting it help?

Usually, yes. A worksheet holds 1,048,576 rows, and handed anything longer Excel loads the first 1,048,576 and warns that the file was not loaded completely. Split at 1,000,000 rows per part and every piece opens whole. Column count is a separate ceiling at 16,384, and splitting by rows does nothing for that.

How big a file can I split on this page?

100 MB. Inside that there is no row limit, no watermark, no sign-up and no daily allowance. Hand it something larger and the widget points you at the full editor, which streams the file instead of holding all of it in memory at once. For reference, 100 MB of short rows is comfortably more than a million of them.

Does every part keep the header row?

Yes, all of them. That is the difference between this and cutting a file up in a text editor or with the Unix split command, both of which leave part 2 onwards starting mid-data. Part 7 opens in a spreadsheet with the same column names as part 1.

Why did I get one CSV instead of a zip?

Because the whole file fit in a single part. When the rows-per-part figure is at least as large as the number of data rows there is nothing to zip, so the download is one CSV and the widget says so. Lower the number, or switch to the number-of-parts mode.

Is there a limit on how many parts I get?

500. Ask for a split that would produce more and the parts are enlarged until the count fits, with a message naming the new rows-per-part figure. A zip holding several thousand entries takes longer to build than the problem it was supposed to solve, and it is worse to work with afterwards.

Does the file leave my computer?

No. This page has no upload endpoint. JavaScript in your tab reads the file, cuts it, and assembles the zip locally. Nothing is stored between visits, so reloading the page gives you an empty box again.

Cut your CSV down to size

Free, no account, no upload, no daily allowance. Set the rows or the part count, check the preview, take the zip.

Back to the splitter