Merge CSV Files Online: Combine Multiple CSVs Into One
Append CSV files with the same columns, or combine files with different columns, in seconds. Free, private and built for big exports: your files never leave your device.
Merge CSV files
Append two or more CSV, TSV or TXT files into one, in your browser.
Add your files
Drag and drop two or more files here
CSV, TSV or TXT, any size. Different delimiters and columns are fine.
Your files never leave your device. They are read and merged by your browser, on your device. Nothing is uploaded.
How to merge CSV files
- Add your files. Drag two or more CSV, TSV or TXT files onto the tool, or click “Choose files”. Put them in the order their rows should appear. Each file shows its delimiter, number of rows and columns.
- Choose how to combine them. Pick Strict for files with the same columns, Union to keep every column from every file, or Column mapping to match columns whose names differ. Then choose output options such as a source_file column or duplicate removal.
- Merge and download. Click “Merge & download”. Your browser builds the merged file on your device and saves it as merged.csv. A summary shows the rows, columns, duplicates removed and the time taken.
Union, Strict or Column mapping: which mode to use
The tool suggests a mode from the headers of your files. Here is what each one does with these two small files:
january.csv february.csv
id,name,amount id,amount,region
1,Alice,10 3,30,North
2,Bob,20Union: keep every column
The merged file gets every column from every file, in the order they first appear. A value that a file does not have stays empty. Union is the safe choice for exports whose columns changed over time, and it adds a source_file column by default so you can tell the rows apart:
id,name,amount,region,source_file
1,Alice,10,,january.csv
2,Bob,20,,january.csv
3,,30,North,february.csvStrict: the same columns in every file
Strict mode checks that every file has exactly the same columns and stops with a clear list of what is missing or extra if not. The column order may differ between files: the tool lines the columns up by name and tells you that it did. Use Strict for monthly exports from the same system, where a different header usually means a mistake. The two files above would be refused, because name and region are not in both.
Column mapping: match columns with different names
Column mapping matches columns by name while ignoring capitals, extra spaces, underscores and hyphens, so Order ID, order_id and ORDER-ID end up in one column. You see the matches in a table and can change any of them: rename an output column, pick a different source column for a file, or skip a column you do not need.
Output options
- source_file column: adds the name of the file each row came from as the last column. On by default in Union and Column mapping.
- Remove duplicate rows: leaves out rows that exactly repeat an earlier row, useful when exports overlap. The source_file column is not part of the comparison.
- Delimiter, line endings and quoting: write commas, semicolons or tabs, with LF or Windows (CRLF) line endings. Quotes are added only where CSV needs them, or around every value if you prefer.
- UTF-8 with BOM: an invisible marker at the start of the file that helps Excel on Windows read accents and symbols correctly.
- Normalise numbers: each file is read with its own delimiter, decimal separator and encoding, and values are copied as written. If you combine a German export (
1.234,5) with an English one (1234.5), this option rewrites decimal commas with a point so every number reads the same way.
Metadata lines above the header, such as the operator and sample rate in a test-rig export, are recognised and skipped, and a units row under the header ([s];[N]) is kept once. The output is a CSV or TSV file; Excel (.xlsx) output is coming soon.
Merging very large CSV files
You can merge files far bigger than Excel could open. When the files share the same header, delimiter and line endings, they are appended unchanged with the header kept once, which is the quickest case: in our tests in Chrome, a 143 MB file with 2 million rows appended to itself took well under a second. Merges that change rows, such as Union with a source_file column, take a little longer.
In Chrome and Edge, tick Save straight to disk to choose the destination first: the merged file is then written to disk as it is produced, which keeps memory use low for multi-gigabyte results. In other browsers, the result is assembled as a download. Want to check the merged file afterwards? The CSV row counter counts its lines in seconds.
Private by design: nothing is uploaded
Many online CSV mergers upload your files to a server. MegaRows does not: the merge runs entirely in your browser, on your device, and the files and their names are never sent anywhere. That makes it safe for customer lists, financial exports and test data that must not leave your computer.
Other ways to merge CSV files
macOS and Linux: head and tail
head -n 1 january.csv > merged.csv
tail -n +2 -q january.csv february.csv >> merged.csvFast and built in, but only for files with identical headers. A file whose last line has no line break gets glued to the next file’s first row, and nothing checks that the columns match.
Python: pandas
import pandas as pd
files = ["january.csv", "february.csv"]
pd.concat([pd.read_csv(f) for f in files]).to_csv("merged.csv", index=False)pd.concat lines columns up by name like Union mode. It loads everything into memory and may reformat values: leading zeros disappear unless you read every column as text with dtype=str.
Excel: Power Query
Put the files in one folder, then use Data → Get Data → From File → From Folder → Combine. It works well for a few files with matching columns, as long as the combined result stays under Excel’s limit of 1,048,576 rows.
Frequently asked questions
How do I merge CSV files into one?
Add the files to the merge tool on this page, check the suggested mode and click “Merge & download”. The header is written once and the rows of every file are appended in the order you set. It works in your browser, so there is nothing to install and nothing is uploaded.
How do I combine CSV files with different columns?
Use Union mode: the merged file gets every column from every file, in the order they first appear, and values a file does not have stay empty. If the same column is spelled differently in different files, for example “Order ID” and “order_id”, use Column mapping, which matches names ignoring capitals, spaces, underscores and hyphens and lets you fix any match by hand.
How can I merge CSV files without Excel?
Use a dedicated tool instead of a spreadsheet. The merge tool on this page reads the files directly, so it is not limited to Excel’s 1,048,576 rows and does not change your dates or numbers. On the command line, tail or PowerShell can append files too, and pandas.concat does it in Python.
How many files can I merge, and how big can they be?
There is no fixed limit on the number of files or rows. Multi-gigabyte totals work. In Chrome and Edge you can save straight to disk, which keeps memory use low however big the result is. Other browsers build the result as a download, which also works for large files but needs free disk space for the browser’s temporary storage.
Are my files uploaded?
No. The files are read and merged by your browser on your own device and are never sent anywhere, not even their names. You can check this in the Network tab of your browser’s developer tools while a merge runs.
Will merging change my numbers, dates or quotes?
No. Values are written back exactly as they appear in your files, so dates, leading zeros and numbers keep their original text. Quotes are added only where CSV requires them, for example around a value that contains a comma. The one optional change is “Normalise numbers”, which rewrites decimal commas such as 1.234,5 as 1234.5 when you combine files from different countries.
Can I remove duplicate rows while merging?
Yes. Tick “Remove duplicate rows” and any row that exactly repeats an earlier one, in the same file or another, is left out. The source_file column is ignored for this comparison, and the summary shows how many duplicates were removed.
Can I merge Excel (.xlsx) files or save the result as Excel?
Not yet. The tool reads and writes text files: CSV, TSV and TXT. Excel input and output are coming soon. Until then, save each sheet as CSV from Excel first, and tick “UTF-8 with BOM” so Excel shows accented characters correctly when it opens the merged file.
Related tools and guides
- PlotterPlot any column of the merged file, zoom in and check the statistics, with millions of rows.
- CSV row counterCount the lines in a CSV, TSV or TXT file of any size, for example to check a merge.
- Guide: how to merge CSV filesSix ways to combine CSV files, from one command to pandas, and nine pitfalls to avoid.
- Open a CSV that is too big for ExcelSix ways to work with more than 1,048,576 rows, with honest pros and cons.
- The MegaRows toolboxWhat works today and what is coming next, and why nothing is ever uploaded.
Coming soon to MegaRows: Sort, filter and search · CSV, Excel, JSON and PDF converters · Split and compare CSV files.
MegaRows processes files locally in your browser. Read our privacy statement for details.