splittool.Small tools. Less friction.
Practical guide / Data

How to Split a CSV File and Keep the Header

Many import tools accept only a limited number of records per file. Splitting by data rows, while repeating the header, can make a dataset easier to import without losing its column names.

Open CSV Splitter ↗

1. Check source encoding and delimiter

Use a UTF-8 CSV or TSV. Choose comma, semicolon, or tab to match the actual separator. A file containing one visible column after import often indicates a delimiter mismatch. Export an Excel worksheet as UTF-8 CSV first; this tool does not open workbooks.

2. Count records instead of physical lines

A quoted field can contain a line break, so a line count is not necessarily a record count. The parser recognizes separators and line breaks inside quotes and handles doubled quotes inside a quoted field.

3. Choose the data rows per part

Set the maximum data rows per file and enable Keep first row as header when the first record contains column names. For 2,500 data rows and a setting of 1,000, the result has three parts: 1,000, 1,000, and 500 data rows, each with an additional header.

4. Inspect the ZIP before importing

Open the first and last files and check their headers and columns. Add the data-row counts across all parts; they should match the source data-row count. Output uses your chosen delimiter, CRLF endings, and UTF-8 with a byte-order mark.

5. Protect text formatting in spreadsheet viewers

The splitter keeps field values as text, but a spreadsheet app may convert 00123 to 123 or interpret a date automatically. Import identifier columns as text when that matters. Only open trusted datasets; spreadsheet apps may interpret formula-like cell contents.

Try a small example first

Create a small CSV with a header, a quoted comma, a doubled quote, and a multiline field. Split at two data rows per part and re-import the outputs to confirm field boundaries before processing the real dataset.

Does the header count toward the selected row limit?

No. With header repetition enabled, a 1,000-data-row part contains 1,001 records including the header. The receiving system may count those differently, so check its import limit.

Ready to try it?

Use the tool on this site and check the output before sharing or importing it.

Use CSV Splitter ↗

Related reading

How to Split an MP3 into Equal Parts

How to Extract a Short Clip from a Video

How to Split an Image into Rows and Columns