Skip to content
toolsdocks

Split or merge CSV files

Stack several CSV exports into one file, or split a large CSV into parts by row count or by the values in a column. Excel sheets work as input too (the first sheet of each workbook). A merge can be saved as CSV or as an Excel workbook (XLSX); a split writes CSV parts.

Runs on your device
Loading tool…

How to use

  1. Merge: add files; columns are aligned by header name and missing ones left blank.
  2. Split: add one file and choose rows per file or a column to split by.

Worked example

Seven records split at 3 rows per file produce three files with 3, 3 and 1 data rows, each starting with the header row. Splitting the same records by a region column with North, South and East gives three files with 3, 2 and 2 rows.

Supported formats and limits

InputCSV, TSV
OutputCSV, ZIP of CSVs
EngineStreaming Papa Parse; header union alignment

Limitations

  • Each input's delimiter and encoding are detected separately; output is UTF-8 with the delimiter you choose.
  • Columns are matched by header name, so files without a header row merge by their generated column names.

Questions

How do I split a CSV into files of N rows?

Choose Split, then set the number of rows per file. Every part starts with the original header row, so 7 records split by 3 give files with 3, 3 and 1 data rows plus the header in each, and the parts download together as a ZIP.

How do I split a CSV by a column value?

Choose Split and pick the column. One file is made per distinct value, in the order values first appear, each with the header row. Parts are named after the value, with characters that are unsafe in file names replaced; blank values are grouped as (blank).

How do I merge CSV files with different columns?

Choose Merge and add the files. The merged header is every column name in first-seen order, matched ignoring case and surrounding spaces: X,Y plus X,Y,Z plus X,Z becomes X,Y,Z, with blank cells where a file lacks a column. The tool lists which columns each file was missing, and can add a source-file column.

Can I merge Excel files?

Yes, as input: XLSX, XLS and ODS workbooks are read (the first sheet of each). Under Output format choose CSV or Excel workbook (XLSX) for the merged result; a split always writes CSV parts.

How do I combine CSV files into one?

Choose Merge and add all the files. Files with the same columns are stacked row under row in the order you add them, and the header appears once. Tick Add a column with each row's source file to keep track of where each row came from, then download the merged CSV.

Guides

Privacy

Runs on your device. Files and text are processed in this browser tab and are not uploaded.

See the privacy policy for how toolsdocks handles data.