Guide
How to Merge Many CSV Files Into One
Twelve monthly exports, same report, same system, and now somebody wants the year. The obvious approach — open each one and paste — is also the one that produces a file nobody can check.
The short answer
Point one tool at the folder. In DataTray, open Data Converter, drop in the files or the
folder, and choose combine. Columns that differ across files are unioned by name rather than
failing, a reconciliation view shows which columns appear in which files and where the nulls will
land, and you can add a source_file column so every row records where it came from. Mixed
formats in one merge are fine — eight CSVs and four Parquet files go into one output.
The three ways merging goes wrong
Headers end up in the data. copy *.csv merged.csv concatenates the bytes, so every file's
header row lands in the middle of the result. You notice this one, at least.
Columns do not line up. File 7 has an extra column, or the same columns in a different order. Concatenation shifts values sideways from that point on — emails in the phone column, dates in the total column. Nothing errors. You find out much later, if at all.
You cannot tell rows apart afterwards. Once merged, there is no way to know which row came from which month, so any anomaly is untraceable. This is the one people regret most and the one that is trivially avoidable.
Union by name, not by position
The fix for the second problem is to match columns by their names rather than their positions. Every column that appears in any file becomes a column in the output; rows from files that did not have it get a null.
That turns a fatal mismatch into a visible, honest gap. Before the run, the reconciliation view shows you the matrix — which columns appear in which files — so a column present in eleven of twelve files stands out immediately. That is usually a rename upstream, and it is worth knowing before you merge rather than after.
Add the source column. Always.
source_file is one checkbox and it is the single most useful thing in this whole page.
With it, an odd row can be traced to the file it came from, a month with suspiciously few rows is
visible in one GROUP BY, and a duplicate that appears twice can be shown to have come from two
different exports rather than being a genuine duplicate. Without it, the merged file has thrown
that away permanently.
It is also universally forgotten, which is why it is worth stating on its own line.
Workbooks merge two ways
Excel adds a dimension, because a workbook has sheets:
- Sheets of one workbook into one table — twelve monthly tabs into a single sheet.
- Many workbooks into one — with a sheet-name filter picking which sheets take part, so
Data*participates and aNotestab does not.
Both are common and they are different jobs, so the panel asks which one you mean rather than guessing.
Then split it back up, if you need to
The reverse operation lives in the same place, because it is the same machinery. Split by row count, by file size, by sheet, or by a column's distinct values — one pass writing a folder per region.
Headers repeat in every output part. That is the thing hand-rolled splitters get wrong, and it is why their output is unusable in anything that expects a header.
Size is not the constraint
Twelve monthly exports of half a gigabyte each is six gigabytes, which is exactly the case where online mergers stop being an option and Excel was never one. Because the files are read from disk and streamed into the output, the merge is bounded by your disk rather than your RAM.
Every other free way to do this asks you to upload the files first — all twelve of them.
Do this in one pass with — Data Converter
CSV, TSV, Excel, Parquet, JSON, JSONL and XML, in whichever direction you need — including the ones Windows has no answer for. Twelve files into one, or one file split into twelve, because converting, combining and splitting are the same job at different cardinalities. Drop a folder in and it works out which you meant. Learn more about the Data Converter.
Windows 10/11 (x64) · Free · No account