Skip to content
Server-sideDeleted in 30 minutes

Split CSV into Smaller Files

Split a CSV table into smaller row-based parts. Choose how many data rows belong in each file and the tool repeats the header in every downloaded chunk, which makes each part independently readable by a spreadsheet or import job. Quoted commas, line breaks, and escaped quotes are parsed before splitting, so a separator inside a description does not create a fake row. This is a practical chunker for manageable browser-sized exports; it does not sort records, deduplicate data, compress files, or split on a semantic key such as customer or date.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free
Input

What it does

  • Row-count based splitting
  • Header repeated in every part
  • Quoted fields and multiline cells
  • Multiple delimiter choices
  • Separate local downloads for each chunk

How to use CSV Splitter

  1. 1

    Paste the complete CSV

    Include the header row and all data records you want to divide. The header is kept in every part and does not count toward the rows-per-file setting.

  2. 2

    Set rows per file

    Enter a positive whole number such as 1000. Each chunk receives at most that many data rows, except the final part, which may be smaller.

  3. 3

    Review the part count

    Check the status message and row count before downloading. The parser treats quoted line breaks as part of a row rather than as separate records.

  4. 4

    Download the parts

    Download each numbered CSV part. Keep the original source so you can reproduce the split if a destination rejects one chunk.

How it works

Output checks

Open an early, middle, and final part after the split and compare headers and record counts before importing the files elsewhere.

Verify every part

Use the output naming pattern to keep parts in their original order, then inspect more than the first file. Check that the header is present where expected, the final record was not dropped, and quoted values remain intact. A row limit counts records rather than visual lines when the CSV contains embedded newlines. If another system will merge the parts later, keep the delimiter, encoding, header policy, and column order identical.

Split planning

Choose a row limit that matches the receiving system rather than splitting only because the source looks large. Confirm whether the header belongs in every output file, whether the first row is data, and whether quoted line breaks should remain inside one record. Open the first and last rows of several parts after download. A split operation should preserve the original field order and quoting, but it cannot repair inconsistent source rows or infer a missing header.

The splitter parses the entire table with a quote-aware CSV state machine before it calculates chunks. This means a comma or newline inside quotes belongs to a cell and cannot accidentally change the row count. The first record is stored as the header; data records are sliced into consecutive groups of the requested size. Every group is serialized with the same header and the selected output delimiter.

Parts are numbered from one and the final part contains the remainder. The operation does not sort or inspect IDs, so input order is preserved exactly at the parsed-value level. It also does not remove a BOM, validate UTF-8, or infer whether a row is a duplicate. Those are separate data-quality decisions and should be made before an automated import.

When to use it

Use this for a batch API with a row limit, a spreadsheet too large for a recipient, or a staged import that needs repeatable row ranges. Prefer a streaming tool for multi-gigabyte files and record the source hash if the parts are part of an audit trail. Always verify the first and last ID in each part before sending the files.

Examples

Sending a four-row export in two batches

id,name 1,Ada 2,Linus 3,Grace 4,James Rows per file: 2
part-1.csv: id,name / 1,Ada / 2,Linus part-2.csv: id,name / 3,Grace / 4,James

The header appears in both files, so each part can be opened or imported without relying on a separate schema file. The data row count, not the header, controls the chunk size.

Keeping a multiline note together

id,note 1,"First line second line" 2,"Ready" Rows per file: 1
part-1.csv contains the complete quoted note for id 1 part-2.csv contains id 2

A newline inside quotes is data, not a record boundary. This prevents a common line-counting script from slicing a note across two files.

Frequently asked questions

Does the CSV splitter count the header as a data row?

No. The first parsed row is treated as the header and is repeated in every part. The rows-per-file number applies only to the remaining records. That means a setting of 100 creates files with one header plus up to 100 data rows, which is normally what import tools and spreadsheet users expect.

Can it split CSV fields that contain line breaks?

Yes, when the line break is inside a properly quoted field. The parser tracks quoted state and keeps that content in one record. An unclosed quote is reported instead of splitting uncertain text, because silently assigning part boundaries to malformed data could place records in the wrong batch.

Does every part have the same columns?

Yes. Every part reuses the parsed header row and contains the same column width. Short source rows are padded with empty cells before splitting. This preserves a stable shape, but it does not validate required values or repair a source whose fields are already misaligned.

Is a large CSV uploaded while it is split?

No. Parsing and creating each downloadable Blob happen locally in the browser. The practical limit is your device memory and browser responsiveness, not a server upload quota. For very large exports, a streaming command-line utility is safer, and you should keep the source plus a manifest of the generated parts.