CSV Splitter for Large Files
: Split a large CSV file into smaller files by row count, number of parts or size, with the header in each partCSV Splitter for Large Files
Cut a CSV file that is too big to open or upload into smaller files: a set number of files, a fixed number of rows per file, or a maximum size in MB. The header row is copied to the top of every part, rows are never cut in half, and the file is read in pieces in this tab, so a multi-gigabyte export works without uploading it or loading it into memory.
How to split a large CSV file into multiple files
- Drop the file on the box, or click it to choose one. The whole file is scanned once with a progress bar; then you see its size, the number of data rows, the line endings (LF, CRLF or CR), whether it has a UTF-8 BOM, and the first ten column names.
- Under
split, chooseintoNfilesfor equal row counts,everyNrowsfor a fixed number of rows per file, orat mostNMB per filefor a size limit. - Leave
first row is a headerandrepeat the header in every fileticked so each part opens with the column names, or untick them for a file without a header. If the file starts with a BOM,start every file with the BOMkeeps it on each part, which helps Excel read accented letters. - Check the list of parts with their row counts and sizes, then press
downloadbeside one,download all (.zip)for every part in one zip, or, in Chrome and Edge,save to folderto write the files straight into a folder you pick.
Example
Seven orders split into 3 files with the tool's own planner. The seven rows share out as 3, 2 and 2 (the first parts take the remainder), the quoted notes that contain line breaks stay inside their rows, and each part starts with the header. The byte range is where the part's rows sit in the original file.
id,customer,note
1,Ada,"call before delivery"
2,Ben,"leave at door
ring twice"
3,Cam,
4,Dee,"says ""fragile"""
5,Eve,
6,Fay,"side gate,
then left"
7,Gus,
── orders-part-01.csv · 3 rows · bytes 17–86 · 86 bytes
id,customer,note
1,Ada,"call before delivery"
2,Ben,"leave at door
ring twice"
3,Cam,
── orders-part-02.csv · 2 rows · bytes 86–118 · 49 bytes
id,customer,note
4,Dee,"says ""fragile"""
5,Eve,
── orders-part-03.csv · 2 rows · bytes 118–154 · 53 bytes
id,customer,note
6,Fay,"side gate,
then left"
7,Gus,Details
- Rows are found from the raw bytes: a line ending ends a row only outside double quotes, and every
"switches between inside and outside, so an escaped""inside a quoted field cancels out. A quoted value with commas or line breaks therefore always stays in one part. The line-ending style is taken from the first row, and a file that starts with LF or CRLF splits correctly even when the two are mixed. - The bytes are copied as they are, never decoded and re-encoded, so UTF-8, Windows-1252, Latin-1, Shift_JIS and GBK files all come out exactly as they went in, and the delimiter does not matter: commas, semicolons, tabs and pipes all split the same way. The delimiter shown above the options is only a guess for display.
intoNfilesgives every part the same number of rows, and when the rows do not divide evenly the first parts get one extra.everyNrowsfills each file and leaves the rest in the last one.at mostNMB per file(1 MB = 1,048,576 bytes) counts the header and BOM in each part and cuts at the last row that fits; a single row bigger than the limit becomes a file of its own and is flagged.- Parts are named after the file with a padded number and the original extension:
sales.csvbecomessales-part-01.csv,sales-part-02.csvand so on, with three digits from 100 parts. Every part but the last ends with a line ending; the last ends the way the original does. Empty lines at the very end of the file are dropped. - Each part is a reference to a stretch of the original file plus the header, not a copy, which is why splitting costs almost no memory. The zip is stored rather than compressed, so it is as big as the parts together; building it reads every part once to compute the checksums a zip needs, and parts under 64 KB are copied into it (64 MB at most) so a zip of thousands of small parts saves at once. A zip of 4 GB or more is written with ZIP64 records, which 7-Zip reads but some older unzip tools do not.
Limits
- UTF-16 files (with a UTF-16 byte-order mark) are refused: save them as UTF-8 first, for example with Excel's “CSV UTF-8” option.
- Splitting by the value of a column (one file per country, say) is not supported; it splits by position only.
- A stray
"inside an unquoted value, such as12" pipe, opens a quoted field that runs to the next quote, joining the rows in between. The tool warns when a quote is never closed or when one row is over 16 MB, which is the usual sign of this. - The first scan reads the whole file, so its time grows with the file size; changing the split options afterwards is quick because only the stretches around each cut are read again.
save to folderneeds the File System Access API, which Chrome, Edge and other Chromium browsers have; elsewhere the button is hidden, and the zip or single downloads work instead.- At most 10,000 files per split.
FAQ
How do I split a large CSV file into multiple files?
Open it here, choose into N files, every N rows or at most N MB per file, and press download all (.zip) or download the parts one by one. The file is read in this tab, so a multi-GB CSV does not have to be uploaded.
Will a row be cut in half?
No. Parts are cut only at the end of a row, and a line break inside a quoted field does not count as the end of a row, so multi-line values stay whole. In size mode the cut moves back to the last complete row that fits.
Does each file keep the header?
Yes, with repeat the header in every file ticked (the default) every part starts with the first row of the original. Untick it to keep the header in the first part only, or untick first row is a header if the file has none.
Can I split a CSV file that is too big for Excel?
Yes. Excel stops at 1,048,576 rows; every N rows with N set to 1000000 gives files that each fit in a sheet with the header. The size of the original file only affects how long the first scan takes.
Runs entirely in your browser. Nothing is uploaded.