Merge CSV Files
Combine multiple CSV files into one, matching columns by name even when their order differs.
Processed on your device — no upload
How to merge CSV files
- Choose the CSV files to combine.
- Leave matching on column names unless you know the order is identical.
- Download the merged file.
How it works
The merged columns are the union of every column across every file, kept in the order they were first seen. Each row is then rebuilt against that list rather than being appended as-is.
That is what makes matching by name safe. Two exports of the same report taken a month apart frequently have their columns in a different order, or one has an extra field the other lacks. Appending them positionally puts email addresses under “city” and nobody notices until the mailing goes out.
Matching by name also means a file missing a column contributes a blank there rather than shifting every subsequent value one place left. The row stays aligned with its own data.
Positional matching is offered for the case where the files genuinely have identical column orders and the names differ — an export that labels the same field email in one file and e-mail in another. It is the riskier option, which is why it is not the default.
The optional source column records which file each row came from. Once several files are merged into one, that is often the only way back to where a particular row originated.
A worked example
You have twelve monthly sales exports and need one file for the year. Some months have an extra discount_code column that was introduced halfway through, and one month's export has the columns in a different order because someone rebuilt the report.
Choose all twelve. Each file is listed with its row and column counts, which is the first useful check: if one shows a wildly different column count from the rest, it is a different report rather than a different month.
With matching by name, the result has every column that appeared anywhere. The months before discount_code existed have blanks in that column, and the reordered month lines up correctly with the others.
Switch to positional matching and watch what happens to the reordered month: its values land under the wrong headings. Nothing errors, the file looks fine, and the data is wrong. That is exactly the failure this defaults away from.
Turn on the source column before downloading. When a total looks wrong in three months time, being able to filter by file name is what makes the problem findable.
If the individual files are untidy, clean each one first — a trailing space in a header makes that column fail to match its counterpart in the other files.
Questions
How do I join several CSV files into one?
Add them all and the rows are stacked under a single header. Concatenate is the right word for it: no matching or lookup happens, the files simply follow one another.
Do the files need identical columns?
They should. When multiple files disagree on their headers the tool says so rather than silently misaligning the columns.
Is my data uploaded?
No. The files are read and combined in your browser, and nothing is transmitted.
What if the files have different columns?
The result contains every column that appeared in any file. Rows from a file that lacked a column get a blank there rather than being shifted.
What if the columns are in a different order?
Matching by name handles it. That is the default and the reason it is the default. Positional matching would misalign the values.
When should I use positional matching?
Only when the files have identical column orders but different column names. It is riskier, because nothing warns you if the assumption is wrong.
Does it remove duplicate rows across files?
No. Merging and deduplicating are separate decisions — run the result through the CSV cleaner if you want duplicates removed.
Why add a source column?
So you can trace a row back to the file it came from. Once several exports are combined, that link is otherwise lost.
Does the order of the files matter?
Yes for the row order, which follows the order you added them, and for the column order, which follows first appearance.
How many files can I merge?
No fixed limit. Everything is held in memory, so the practical ceiling is the combined size against your device.
Is this the same as combining or joining CSV files?
It is one job under three names. Combine CSV files, join CSV files and merge CSV files all mean stacking rows from several sheets into one, matching them by column name rather than by position — so a file whose columns are in a different order still lines up.