Merge CSV files
Stack several CSV files with the same columns into one.
- 1Upload
- 2Settings
- 3Download
How to use Merge CSV files
About Merge CSV files
Exports from the same system often arrive as one file per month, per region or per store, and you want them all in one table. This free tool stacks up to 50 CSV files into a single merged.csv in your browser. The header is kept once and the data rows of every file follow in the order you add them.
By default it checks that every file has identical column headings and stops with a message naming the first file that does not match, so you never end up with columns shifted under the wrong heading. You can switch that check off, and you can add a source_file column that records which file each row came from.
How it works: the tool stacks several CSV files with the same columns into one, writing the header once and appending the rows from every file in the order you choose.
Step by step: 1) add the CSV files; 2) order them; 3) merge; 4) download and check the total rows. The row count should be the sum of all files minus the extra header rows.
Realistic limits: files should share the same columns in the same order. If they differ, values can end up in the wrong column, so compare headers beforehand. The tool does not remove duplicates, so overlapping exports will repeat rows; use CSV Clean afterwards if needed. Combined size is limited by memory.
Typical uses: joining monthly exports into a yearly file, combining lists from several team members, or rebuilding data previously split.
Preparation: open the files and compare headers. They should have the same names in the same order, and use the same delimiter and encoding. If one export has an extra column, add it to the others or remove it, otherwise values shift and later columns misalign. Decide whether you need to keep track of origin; adding a column naming the source before merging makes that possible.
After merging: confirm the row total and scan for duplicate rows where exports overlapped, such as when two date ranges share a boundary day. Sort by a key column to bring duplicates together. Then clean or deduplicate as needed and save the result as your master file, keeping the original parts as backups.
Tips for better results
- Choose at least two files. Use the arrows in the list to change the order before merging.
- Make sure the files use the same delimiter and column order. Differences are the usual cause of the header warning.
- After merging, use CSV cleaner to drop duplicate rows, or CSV to Excel to open the result as a workbook.
- Use identical headers in every file.
- Add a source column beforehand if you need to track origin.
- Keep file encodings consistent.