Home / Blog / Merge CSV Files
How-to · 2026

How to Merge Multiple CSV Files Into One

Two jobs get called "merge." Stacking same-shape exports on top of each other is one; joining two different files on a shared column is the other. Here is how to do both — and the quickest path when the files need joining, not just stacking.

By the Quiriz Team · Published August 4, 2026 · 6 min read

First decide which "merge" you mean. Stacking puts same-shape files on top of each other — twelve monthly exports into one. Joining puts different files side by side by a shared key — orders plus the customer details that match. They're different jobs with different tools.

Stack same-shape files with Power Query

For more than two files with the same columns, this is the clean way. Put the files in one folder, then in Excel go to Data → Get Data → From File → From Folder, select the folder, and choose Combine & Load. Power Query appends every file into a single table and adds a Source.Name column so each row still says which file it came from. Drop new files into the folder and refresh — no rebuild.

Stack them with one command line

For a fast one-off, concatenate the files directly. In the folder, on Windows:

copy *.csv combined.csv

On macOS or Linux:

cat *.csv > combined.csv

It's instant, but it keeps the header row from every file, so you'll have repeated header lines to delete. Fine for two or three files; Power Query is better when headers matter.

When you're joining, not stacking

If the files have different columns that share an ID — an orders export and a customers export both carrying customer_id — stacking is the wrong tool. You want a join: bring the columns from one file next to the matching rows of the other. In a spreadsheet that's a lookup:

=XLOOKUP(A2, customers!A:A, customers!C:C)

That pulls one column from the customers file into the orders file by matching the key. It works, but you repeat it per column you want, and on large files it gets slow and fragile.

The easier join: ask for it and download the result

When the join is the whole point, skip the lookups. With Quiriz you can:

  1. Upload the CSV files — directly from Excel or Google Sheets with the add-in, or in the app.
  2. Ask for the join in plain English — create a report with a prompt like "Generate a report joining orders and customers on customer_id."
  3. Download the combined CSV — once the report finishes, open the step result and download the joined data as a CSV.

You describe the key once and get the merged file back, with no per-column formulas to maintain. It's the same result a database join would give you, without writing SQL.

Join your files without the lookups

Upload your CSVs, ask Quiriz to join them on a shared column in plain English, and download the merged file. Free to start.

Try Quiriz free →

Frequently asked questions

How do I merge multiple CSV files into one?
If the files have the same columns, stack them. In Excel use Data > Get Data > From File > From Folder, point at the folder, and choose Combine & Load — Power Query appends every file into one table and tags each row with its source file. For a quick one-off you can also concatenate them from the command line.
How do I combine CSV files using the command line?
On Windows, in the folder with your files, run copy *.csv combined.csv (macOS/Linux: cat *.csv > combined.csv). It is instant, but it keeps the header row from every file, so you get repeated headers to delete afterward. Power Query handles the headers for you.
What is the difference between stacking and joining CSVs?
Stacking (a union) puts same-shape files on top of each other — more rows, same columns. Joining puts different files side by side by matching a shared key like customer_id — same rows, more columns. Stacking two monthly exports is a union; adding customer details to an orders file is a join.
How do I join two CSV files on a common column?
In a spreadsheet, use VLOOKUP or INDEX/MATCH to pull columns from the second file into the first by the shared key. For many columns or large files that gets tedious — a faster path is to upload both files to Quiriz, ask it to join them on the key, and download the combined CSV from the result.