Merge CSV Files
Add several CSV files, put them in order and download one merged CSV, with columns matched by header name.
Your files are merged inside this page and never uploaded.
What this tool does
To merge CSV files, add them, set the order and download the result. The tool reads each file's header and matches columns by name, so files whose columns are in a different order still line up, and columns missing from a file are left blank. You can add a column that records which file each row came from.
Reads each CSV and stacks their rows under a single header made of every column name found.
Reports files whose headers differ from the first, and optionally adds a source_file column.
How to use it
- Add the CSV files - choose several at once.
- Move them into the order you want, or remove any you do not need.
- Tick "Add a column showing which file each row came from" if you want one.
- Check the preview and the summary, then press Download CSV.
Why use this tool
Stacks any number of CSV files into one, lining columns up by header name, so files with the same columns in a different order merge correctly. Exports often arrive in pieces - one file per month, per branch or per page. Merging them by hand in a spreadsheet risks misaligned columns and lost rows; matching by header name keeps every value under the right heading.
Why we built it
We built the CSV merge tool to line up columns by header name, so files with the same columns in a different order still merge correctly. Split large files with the CSV splitter and remove repeats with the CSV duplicate remover.
Who this tool is for
- Analysts combining monthly exports
- Admins merging lists
- Developers consolidating data
When to use it
- Combining monthly or regional exports into one data set.
- Putting split files back together after processing.
- Appending new rows from one file to a master list.
- Preparing one file for import, pivot tables or analysis.
How it works
The header of every file is read and compared without regard to case or surrounding spaces. The merged file's columns are every distinct header in the order first seen. Each data row is then placed under the column of the same name, and any column a file lacks is left empty.
Completely blank rows are dropped. Files are separated automatically by detecting whether each uses commas, semicolons, tabs or pipes, and the output uses the separator you choose.
This stacks rows (appends). It does not join files on a key column the way a database or VLOOKUP would.
What you give it, and what you get back
| Item | Details |
|---|---|
| Input | Two or more .csv, .tsv or .txt files, each with a header row. |
| Order | Files are stacked in the list order, which you can change. |
| Options | An extra source_file column, and the output separator. |
| Output | One merged CSV, with a summary of files, rows and columns. |
Issues you may run into
| What you see | Why it happens | What to do |
|---|---|---|
| A column appears twice with slightly different names | "Email" and "E-mail" are different headers. | Rename the header in one file, then merge again. |
| Rows seem to be missing | Completely blank rows are removed. | This is intended; check the source files for blank lines. |
| Columns from one file are empty | That file has different header names. | Check the note listing files with different headers and rename them to match. |
| Download button is disabled | At least two files are needed. | Add another file. |
Assumptions and limitations
- Appends rows only; it does not join on a key.
- Every file needs a header row to be matched by name.
- All files are read into memory.
Frequently asked questions
How do I merge multiple CSV files into one?
Add the files, arrange the order and press Download CSV. The columns are matched by header name and the rows are stacked.
What if the files have different columns?
The merged file has every column from every file. Where a file lacks a column its cells are left blank, and the tool lists the files whose headers differ.
Does the order of columns matter?
No. Columns are matched by name, so files with the same headers in a different order merge correctly.
Can I tell which file a row came from?
Yes. Tick the source-file option to add a source_file column.
Is my data uploaded?
No. The files are merged in your browser.
Can I split the merged file again?
Yes - use the CSV splitter to cut it into parts by rows or by number of files.