Merge CSV Files

Combine several CSV or Excel files into one, matching columns by name.

About Merge CSV Files

Monthly exports, one file per store, one report per region: sooner or later you have a folder of CSV files that should be a single table. Copying and pasting them in Excel is slow and breaks as soon as one file has its columns in a different order or an extra column. This tool merges any number of CSV and Excel files into one, and by default it lines up the columns by their header name, so "Email" in one file and "email" in another end up in the same column.

Columns that exist in only some files are kept and left empty where they are missing, and you get a warning listing them. You can add a column with the name of the file each row came from, remove duplicate rows across files, and download the result as CSV or as an Excel workbook. All files are read in your browser; nothing is uploaded.

How to use Merge CSV Files step by step

  1. Select or drag all the CSV, TSV, TXT or Excel files at once onto the upload area. You can add more files later with "Add files".
  2. Check the list: each file shows its number of rows and columns. Remove any file you added by mistake with the X.
  3. Keep "Match columns by header name" if the files have headers. Choose "Append rows as they are" only for files without a header or with an identical layout.
  4. Optionally tick "Add a column with the source file name" and "Remove duplicate rows after merging".
  5. Review the preview and the row count, choose the delimiter and click "Download merged CSV" or "Download Excel".

Input and output example

Input

january.csv
email,name,plan
ana@example.com,Ana,pro

february.csv
name,email,plan,country
Luis,luis@example.com,free,US

Output

email,name,plan,country,source_file
ana@example.com,Ana,pro,,january.csv
luis@example.com,Luis,free,US,february.csv

Why use our Merge CSV Files?

Common use cases

Limits and tips

Frequently asked questions

How do I combine multiple CSV files into one?

Select all the files at once in this tool. They are stacked into one table with the columns matched by header name, and you download the result as a single CSV or Excel file. No command line, macro or Power Query is needed.

What if the files have the columns in a different order?

With "Match columns by header name" the order does not matter: each value goes to the column with the same header. Columns missing from a file are left empty for that file's rows.

Can I merge CSV files without a header row?

Yes. Choose "Append rows as they are": rows are stacked by position. In that mode the first row of the first file is used as the header, so add a header to the first file if it has none.

How can I tell which file each row came from?

Tick "Add a column with the source file name". A source_file column is added at the end with the original file name of every row.

Are my files uploaded?

No. Files are read and merged by JavaScript in your browser. Nothing is sent to a server, so you can merge customer or financial data safely.

Related guides

Related tools

Other free utilities you may find useful

Available languages