How to Merge Many CSV Files into One File
Twelve monthly exports, one report. Here is how to put the files together without copy and paste.
Why merge. Exports often arrive in pieces: one file per month, per store or per day. To analyze them together you need one table. Copying and pasting between sheets is slow, and it is easy to miss a file or paste a header row into the middle of the data.
How merging works. The files are stacked one after another: all rows of the first file, then all rows of the second, and so on. If a file has a column the others do not have, the column is kept and the other rows get an empty cell. If the columns are named differently, such as Amount and amount_usd, they stay separate columns, so rename them first with Data Transformation.
Keep track of the source. Turn on the source_file column and every row gets the name of the file it came from. This makes it easy to find a problem, or to split the data again later by month.
Different formats are fine. In Data Utility you can mix CSV, JSON, Excel and Parquet files in one merge, and save the result as CSV, Excel, JSON or Parquet. The files are read in your browser and are not uploaded, so it is safe for customer data. Very large merges are limited by your computer memory.
Related tool pages
- Combine Multiple CSV Files into One: Combine many CSV files into one file in your browser. Add a source_file column, mix in Excel or JSON files, and download CSV, Excel or Parquet. Free.
- Merge Parquet Files into One: Merge several Parquet files into one Parquet, CSV or Excel file in your browser. No code and no upload. Free, with a source_file option.
- Split a CSV File into Parts: Split a CSV into smaller files by number of rows, number of parts or the value of a column. Download them as one ZIP. Free, in your browser.
- Split a Large CSV into Smaller Files: Split a large CSV into smaller files so Excel or an import tool can open them. Choose rows per file and download all parts as a ZIP. Free, no upload.
- Split a Parquet File into Parts: Split a Parquet file into smaller Parquet, CSV or Excel files by rows, equal parts or a column value. Free, in your browser, nothing uploaded.
How to use the Merge or Split Files: step by step
- Open Merge or Split Files.
- Drop in all the files you want to merge.
- Check the list and the preview.
- Download the merged file.
When to use the Merge or Split Files
- Combine monthly exports into one report
- Merge Parquet parts into one file
- Join exports from several stores
- Prepare one file for an import
Example
Input: jan.csv + feb.csv + mar.csv
Output: merged.csv, 3 files in one
Frequently asked questions
Can I merge different formats?
Yes. You can mix CSV, JSON, Excel and Parquet files. They are read, stacked one after another and saved in the format you choose.
How can I split a file?
Choose rows per file, a number of equal parts, or one file per value of a column. You download all parts as one ZIP, in CSV, JSON, Excel or Parquet.
What if the files have different columns?
All columns are kept. Cells for a column that a file does not have are left empty, and the tool lists those columns so you can check.
Can I merge CSV and Parquet files together?
Yes. You can mix CSV, JSON, Excel and Parquet files. They are stacked in the order you add them and saved in the format you choose. Columns missing in some files are left empty.
Tip: Check the list of columns missing in some files before you merge. It often shows a column that was renamed.