Merge CSV files into one

Combine monthly exports, files from different people or every sheet of a workbook into a single CSV or Excel file. Columns are lined up by name, so they don’t need to be in the same order.

Choose the files to merge

or drop CSV or Excel files here. Use the arrows to set the order.

Up to 20 files at a time. Your files stay on this device.

View history

This converter is taking a while to load. Check your connection, then reload the page.

Your files stay on this device: the conversion runs in your browser and nothing is uploaded. Learn how your files are handled

How to merge CSV files

  1. Add your files. Choose several at once, and add more later if you need to. Each sheet of an Excel workbook is added as its own table.
  2. Arrange them with the ↑ buttons if the order matters. Rows are added in the order of the list.
  3. Choose the options: line up columns by name or by position, add a source-file column, remove duplicate rows.
  4. Download the merged CSV or Excel file.

Matching columns by name

With by column name (the default), a column called Email in one file and email in another end up in the same column, even if one file has it first and the other last. Columns that only some files have are added at the end, and rows from files without them are left blank there. Nothing is dropped.

With by position, the first column of every file goes into the first column of the result, and so on. Use it when the files have no header row, or when the same columns have different names.

Source column and duplicates

  • Source file adds a first column showing the file (and sheet) each row came from. This helps if you later need to trace or filter rows by file.
  • Remove duplicate rows keeps the first copy and removes later rows that are identical in every column. Spaces at the start or end of a value are ignored. The number of rows removed is shown before you download.

Mixed separators and text formats

The separator (comma, semicolon, tab or pipe) and the text format (UTF-8, UTF-16 or Windows-1252) are detected separately for each file, so files exported from different systems can be merged. The result is a standard UTF-8 CSV file, or an Excel workbook.

Doing it in Excel instead

Excel for Microsoft 365 on Windows can also combine files kept in one folder with Power Query: Data → Get Data → From File → From Folder, choose the folder, then Combine & Transform Data. This suits a job you repeat every month with files of the same layout. For a one-off merge, or files whose columns or separators differ, choosing the files here takes fewer steps.

Frequently asked questions

What if the files have different columns?

Every column from every file appears in the result. Rows from files that don’t have a column are left blank in it. Columns are matched by name, ignoring upper and lower case.

Will the header row be repeated in the middle?

No. Each file’s header row is used to match the columns and appears only once, at the top of the merged file.

How many files can I merge?

You can merge up to 20 files and 150 MB at a time, about as much as a browser tab can work on at once. Files with hundreds of thousands of rows in total merge in seconds on a typical computer.

Can I merge Excel files too?

Yes. Choose .xlsx files, and each sheet with data is added. You can mix them with CSV files and download the result as CSV or as an Excel workbook.

How do I put several CSV files on one worksheet in Excel?

Merge them here and download the result as an Excel workbook. All the rows end up on one sheet, with the columns lined up by name and a single header row at the top. Tick the “Source file” column option to see which file each row came from.

How do I combine two Excel files and remove duplicates?

Choose both .xlsx files, tick “Remove duplicate rows” and download the result as CSV or Excel. Columns are matched by name, so the files don’t need the same columns in the same order. A row counts as a duplicate when every column matches an earlier row, and the number of rows removed is shown before you download.

What can I do if a CSV file is too large for Excel?

Excel shows at most 1,048,576 rows per sheet. If the merged result has more, download it as CSV rather than as an Excel workbook, then cut it into parts Excel can open with the CSV splitter. Or merge only the files you need for the job at hand.

Are my files uploaded?

No. The files are combined in your browser, and the merged file is created on your device.