Merge CSV Files

About Merge CSV Files

Merge CSV Files combines several CSV, TSV or Excel files into a single table, which is what you need when the same report is exported once a month, when each branch, shop or salesperson sends their own list, or when a system splits a large export into parts. Copying files together by hand or with the command line works only if every file has exactly the same columns in exactly the same order, and it repeats the header row in the middle of the data. This tool reads each file, keeps the header row once at the top, and by default lines up the columns by their names, so a file with the columns Email, Name and another with Name, Phone, Email still merge into one table with Name, Email and Phone in the right place. Columns that exist in only some files are added and left empty for the others, and a warning tells you how many there are, so a renamed column is easy to spot. If the files have no header, or are guaranteed to be identical, the rows can simply be stacked by position instead. Optional extras make the result more useful: a Source file column records which file every row came from, and duplicate removal drops rows that are identical in every column, which happens when exports overlap by a few days. The order of the files can be changed with the arrows, and the merged table can be downloaded as CSV with a comma or semicolon, or as an Excel workbook. Excel files are supported too, and every sheet with data counts as a separate table. Nothing is uploaded. To convert the result for Excel without losing leading zeros use CSV to Excel Converter, and to split a workbook into CSV files first use Excel to CSV Converter.

Merging tables sounds trivial until the files disagree. The most common problems are a column that was renamed between exports, a column added halfway through the year, files saved with different separators because they came from computers in different countries, and the same rows appearing in two exports that overlap by a day. Matching by column name handles the first two, the automatic separator detection handles the third, and duplicate removal handles the last. A few habits help. Check the preview after merging and look at the right edge of the table: an unexpected extra column almost always means two files spell the same heading differently, and fixing the header in the source file gives a cleaner result than merging two half-empty columns. Add the source file column when you merge reports from different people or periods; it costs nothing and makes it easy to filter or count rows per file later in a pivot table. Keep the files in chronological order if the order of rows matters, and use the arrows to fix it before downloading. For very large merges, CSV output is lighter than Excel and has no row limit, while Excel output is better when people will open the result directly, because it keeps leading zeros and long numbers intact. If your files are Excel workbooks with one sheet per month, you can load them directly, or split them first with Excel to CSV Converter. When the merged list is a contact list, CSV to vCard Converter converts it into a .vcf ready for a phone.

How to use Merge CSV Files

  1. Drop two or more CSV or Excel files and put them in order
  2. Match columns by name or position, add a source column or remove duplicates
  3. Download the merged CSV or Excel file

Frequently Asked Questions

How do I merge multiple CSV files into one?
Drop all the CSV files onto the tool at once. They are combined in the order shown, with the header row kept once at the top, and a preview shows the result. Click Download merged CSV to save it, or choose Excel to get an .xlsx file.
What if the files have columns in a different order?
Keep Match columns by column name selected. Columns are lined up by their header, ignoring upper and lower case and extra spaces, so the values always end up under the right heading no matter where the column was in each file.
What happens when one file has an extra column?
The column is added to the merged table, and the rows from files that do not have it are left empty in that column. A notice shows how many columns appear in only some files, which helps you spot a column that was renamed, for example E-mail in one file and Email in another.
Can I see which file each row came from?
Yes. Tick Add a column with the source file name and the merged table gets a last column called Source file with the original file name, or the file and sheet name for Excel workbooks.
How are duplicate rows handled?
Rows are kept as they are by default. Tick Remove duplicate rows to keep only the first copy of rows that are identical in every column, which is useful when exports overlap. Rows that differ in any column, even by one character, are all kept.
Can I merge Excel files too?
Yes. .xlsx workbooks can be mixed with CSV files. Every sheet that contains data is treated as a separate table and merged with the rest, and you can save the result as CSV or Excel.
Are my files uploaded?
No. All files are read and merged in your browser, and the merged file is created on your device. Nothing is sent to ToolBox, so it is safe for sales data, customer lists and financial exports.

Related Tools