Split CSV Into Multiple Files

Your file never leaves your machine. To split a CSV file into multiple files you shouldn't have to upload your customer list, payroll export, or transaction history to a stranger's server — this splitter reads the file with the browser's file API, divides it right here in the tab, and hands the parts back as downloads. Disconnect from the internet after the page loads and it still works.

To split a CSV file, choose rows per file or number of parts; every part keeps the header row. A 10,000-row file split at 3,000 rows per file becomes four files — 3,000 + 3,000 + 3,000 + 1,000 rows — each opening cleanly in any spreadsheet or import script because the header travels with every part.
Drop a .csv file here, or click to choose — it's read locally, never uploaded.
Working…
[ Ad slot — replace with AdSense / Ezoic code ]

Large files, privately

The reason to split a CSV is almost always that it's big, and big CSVs are almost always sensitive — customer exports, payroll runs, transaction logs, mailing lists. Uploading that to a web service means trusting an unknown server, an unknown retention policy, and an unknown breach history with exactly the data you'd least like to leak; the desktop alternatives want an install or a subscription for what is, at heart, a loop over lines. This page does the loop in your browser: the file API reads the file into the tab, the split happens in memory with a progress bar, and each part is a download generated on your machine. Nothing is transmitted, because there is nothing to transmit to.

Honest limits: the ceiling is your browser's memory, not a server plan. Files of a few hundred megabytes work on typical hardware; for gigabyte-class files, close other tabs first and expect the progress bar to earn its keep. If the browser can't hold the file, no client-side tool can help — that's the point where command-line tools on your own machine are the right answer, and we'd rather say so than pretend.

Split by rows per file

The classic mode: pick how many data rows each part should hold, and the file is dealt out in order — 10,000 rows at 3,000 per file gives you 3,000 + 3,000 + 3,000 + 1,000. The last part holds the remainder; row order is preserved; and the count refers to data rows, so the repeated header doesn't eat into your quota. This is the mode for import tools with row limits per batch and for handing a team chunks of a work queue.

Split into N equal files

Sometimes the constraint is the number of parts, not their size — five files for five teammates, twelve for twelve parallel workers. This mode divides the rows as evenly as arithmetic allows: 1,000 rows into 3 files is 334 + 333 + 333, never 500 + 500 + 0. If you ask for more files than there are rows, you get one row per file and no empty parts.

Split by max file size

Upload forms and email attachments cap bytes, not rows, so this mode targets a maximum size per part. It's honestly approximate: rows are dealt into the current part until adding the next one would cross the limit, then a new part starts — so parts land just under the cap, rounded to the nearest whole row. A single row larger than the cap (it happens, with quoted text blobs) becomes its own oversized part with a warning rather than being truncated, because a cut record is corrupt data.

Split by values in a column

The bonus mode: choose a column and get one file per distinct value — orders split by country, logs split by service, a roster split by department. Grouping is capped at 200 distinct values; beyond that you'll get a warning instead of a thousand-file download, because a column with that many values is usually the wrong grouping key (an ID column, most often) rather than a category.

Why the header rides along in every part

Row 1 of a CSV is the contract: it names the columns so that spreadsheets, import wizards, and dataframe libraries know what they're looking at. Split a file naively and only part 1 keeps that contract — parts 2 through N open as anonymous grids, and every import step downstream needs manual column mapping. This splitter writes the header as row 1 of every part by default. The toggle exists for the one real exception: recombining parts later by simple concatenation, where repeated headers would land in the data as bogus rows.

The quoted-newline trap (why line splitters corrupt CSVs)

CSV allows a quoted field to contain real line breaks — one record spanning several lines of the file. It's not exotic: any export with an address field, a comments column, or product descriptions has them. A splitter that counts newlines will sooner or later cut one of these records in half, leaving an unclosed quote at the end of one part and half a record at the start of the next — both files corrupt, often silently. This tool scans quote state as it walks the file, so a record boundary is only ever declared outside quotes; a multi-line record moves into a part whole or not at all. It's the single behavior that separates a CSV splitter from a line splitter, and it's tested here with exactly that vector.

Why CSVs get split at all

The classic trigger is the spreadsheet row ceiling: Excel worksheets hold at most 1,048,576 rows, so a bigger export simply won't open whole — rows past the limit are dropped on import, and the fix is to split the file below the ceiling first. The other regulars: import tools and APIs with per-request row or byte limits, email and upload size caps, and parallel processing where each worker takes a slice. In every one of those cases the requirement is the same — clean parts, each with the header, no record cut mid-way — which is the whole spec of this page.

[ Ad slot — replace with AdSense / Ezoic code ]

Related tools

Frequently asked questions

Is my file uploaded anywhere?

No. The file is read with the browser's file API and split by JavaScript in this tab. There is no upload endpoint on this page; you can load it, go offline, and split the file with the network cable out.

How big a file can it handle?

The limit is your browser's memory. Files of a few hundred megabytes work on typical machines; for gigabyte-class files close other tabs first. If the browser can't hold the file in memory, split it on your own machine with command-line tools instead — no client-side web page can go past that ceiling.

Does every part really keep the header?

Yes, by default — the header row is written as row 1 of every part, so each file opens correctly in spreadsheets and import tools. Untick the toggle if you plan to recombine parts by concatenation later.

What happens to records with line breaks inside quotes?

They move as a unit. The splitter tracks quote state, so a record boundary is only recognized outside quotes — a multi-line quoted record is never cut across two parts. This is the failure mode of naive line-based splitters, and it's explicitly tested here.

Is the size-based split exact?

It's approximate by design: parts are filled with whole rows until the next row would cross your limit, so each part lands just under the cap. A single row bigger than the cap becomes its own part with a warning — truncating a record would corrupt it.

How does the ZIP download work without a server?

The ZIP is assembled byte-by-byte in the browser — file entries, central directory, checksums — using the ZIP format's uncompressed (store) mode, and offered as a normal download. No compression library, no CDN, no network involved. Store mode means the ZIP is about as large as the parts combined, which is the honest trade for zero dependencies.

What about character encoding?

The file is read as UTF-8, and a leading byte-order mark is preserved onto every part so spreadsheet apps keep accented characters intact. Files in legacy encodings such as Windows-1252 may show mojibake — re-save them as UTF-8 first.