Skip to the tool
ViewCSV
Files stay on your device

Split a CSV into smaller files

orders.csv· SAMPLE DATA15 rows · 8 columns
Parts are byte-for-byte copies of the original records: quoting, line endings and the byte-order mark stay the same, and a quoted line break never splits a record.
Choose how to split, then list the parts or download them as a ZIP.

Each part can also be downloaded on its own from the list.

15 rows

Open a CSV and choose how to cut it: a fixed number of rows per file, a maximum file size, a number of files, or one file per value of a column. Each part is a byte-for-byte copy of the original records, with the header repeated at the top, so quoting, line endings, encoding and byte-order mark stay as they were. Preview the list of parts, then download them one by one or together as a ZIP. Files larger than 25 MB are split too, and nothing is uploaded.

How to split a CSV file

  1. Open a .csv, .tsv or .txt file, drop it on the tool, or paste rows. The first row is treated as the header.
  2. Choose what to split by and enter the number of rows, the maximum size in bytes, the number of files, or the column.
  3. Preview the parts to see each file's name, row count and size, then download a single part or all of them as one ZIP.

Parts are named after the original file: orders.csv becomes orders-part-001.csv, orders-part-002.csv… A .tsv file keeps the .tsv extension. The ZIP is named orders-parts.zip.

Ways to split

Rows per fileEvery part gets this many data rows; the last part gets the remainder. The header is not counted.
Maximum size per fileEach part is filled with whole records until the next one would go over the size, counted in bytes including the header and byte-order mark. A record is never cut in half, so a single record larger than the limit stops the split with an error naming it.
Number of filesThe tool counts the records first, then puts the same number of rows in every part, rounded up (at most 1,000 files). Because of the rounding you can get fewer files than you asked for: 5 rows into 4 files gives parts of 2, 2 and 1.
One file per column valueRows are grouped by the exact value in the chosen column, and each value becomes orders-West.csv, orders-East.csv… in order of first appearance. Rows keep their original order inside each part. At most 1,000 distinct values.
Repeat the header in every partOn by default. Turn it off to keep the header only in the first part, for example when the parts will be concatenated again later.

Quoted values, raw records and file names

  • Quoted values containing the delimiter or line breaks stay inside their record, read per RFC 4180. A multiline address is never split across two parts.
  • Records are copied as raw bytes, never re-parsed and re-written: quotes, line endings and leading zeros are kept exactly. A UTF-8 byte-order mark at the start of the file is written at the start of every part, so Excel still recognizes each one as UTF-8.
  • Blank lines between records are skipped. If the last record has no line break, the part gets the file's own line ending.
  • Column values are compared exactly: West and west become separate files. Since many file systems ignore case, the second one is named orders-west-2.csv rather than overwriting the first.
  • In file names, characters such as / \ : * ? " < > | become _, names are cut at 60 characters, and an empty value is written as orders-empty.csv. Use the value column in the preview to see exactly which value each file holds.

Encodings that can be split

Splitting works directly on bytes, which is safe for UTF-8 and single-byte encodings such as Windows-1252. UTF-16 files cannot be split this way; save them as UTF-8 first, for example with Change CSV delimiter and encoding. Shift_JIS, GB18030, GBK and Big5 files can be split when the delimiter is a comma, semicolon or tab, but not a pipe, because a pipe byte can occur inside a character in those encodings. The tool tells you before you start when a file can't be split.

Split errors and how to fix them

  • One record is larger than the chosen part size. Raise the maximum size; it has to fit the header plus the largest single record.
  • This split would create more than 1,000 files. Increase the rows per file or the size, or choose fewer files.
  • This column has more than 1,000 distinct values. Split by a broader column, such as region instead of customer, or filter the file first.
  • A quoted value never closes. A quote opened somewhere in the file is never closed, so the rest of the file would be one record. Find it with Validate CSV.

Large files and privacy

Split is not limited to 25 MB. A larger file shows a preview of its first 200 rows, and the split reads the whole file in 8 MB chunks, so memory use stays low. Parts are kept as browser file data until you download them; the practical limit is the free storage your browser can use.

Splitting runs in a background worker in this tab and Cancel stops it. The file is never sent to a server. To put parts back together, use Merge CSV files; to shrink a file instead of cutting it up, use Compress CSV.

Example: an order export split into parts of 2 rows

A small order export with CRLF line endings (shown here as plain line breaks) and a multiline note, split into parts of 2 rows with the header repeated. The quoted line break stays inside order A2, and the last record, which had no line break in the input, gets the file's CRLF ending.

CSV
order_id,region,note
A1,West,ok
A2,East,"two
lines"
A3,West,"a, b"
A4,,late
A5,east,ok
3 files
orders-part-001.csv (2 rows)
order_id,region,note
A1,West,ok
A2,East,"two
lines"

orders-part-002.csv (2 rows)
order_id,region,note
A3,West,"a, b"
A4,,late

orders-part-003.csv (1 row)
order_id,region,note
A5,east,ok

Questions and answers

Will every part open correctly in Excel?

Yes, as long as the original did: each part has the same header, delimiter and encoding, and keeps the UTF-8 byte-order mark if the original had one.

Can I split by a column without a header row?

No. The first row is always read as the header, and the column is chosen by its header name. Add a header row first, for example in the CSV editor.

Why did I get fewer files than I asked for?

Number of files puts the same row count in every part, rounded up, so the rows can run out before the last file. 10 rows into 4 files gives 3, 3, 3 and 1; 10 rows into 6 files gives five files of 2.

Standards and references